]> git.draconx.ca Git - cdecl99.git/commit
libcdecl: Punt gnulib lock module.
authorNick Bowler <nbowler@draconx.ca>
Wed, 24 Jan 2024 06:19:59 +0000 (01:19 -0500)
committerNick Bowler <nbowler@draconx.ca>
Thu, 25 Jan 2024 05:34:32 +0000 (00:34 -0500)
commitc11f668ec9c5b2f0016cf6920a111c52e895b24a
tree3cff4bfc003370ecf1d4d2bc5446c2b54abdb245
parent1b96e9580714d7a677d10a8e286b3f8a2bddc6f5
libcdecl: Punt gnulib lock module.

This module is total overkill for what we need, which is to provide
one-time library initialization.  Except for the pthread_in_use
detection, this module does not appear to work around any particular
portability problem with POSIX pthread_once or standard C call_once.

On the other hand, on GNU/Linux the unused code this module links in
represents almost 5% of the size of the entire library (which includes
eight pointless PLT entries).

We have to make a local copy of the pthread_in_use macro definition,
as it is no longer imported into the project.  Further improvements
may be possible to specialize this test for our use case, but for
now stick with the Gnulib version which is known to work on a lot
of different systems.
bootstrap
lib/local/modules/dx-threadlib
src/error.c
src/thread-posix.h
src/thread-stdc.h
src/thread-w32.h