summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/Makefile.inc
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-11-20 19:19:51 +0000
committerjhb <jhb@FreeBSD.org>2009-11-20 19:19:51 +0000
commitb850b4760dddafa38d7850f86e99ce47326a2676 (patch)
tree9dcf60a4d7bd680a0877e1a8aa449c9766bdcc8f /lib/libc/gen/Makefile.inc
parentbe8a54e0c3db12d3fecac288bf6ddfd350731d11 (diff)
downloadFreeBSD-src-b850b4760dddafa38d7850f86e99ce47326a2676.zip
FreeBSD-src-b850b4760dddafa38d7850f86e99ce47326a2676.tar.gz
Add an internal _once() method. This works identical to pthread_once(3)
with the additional property that it is safe for routines in libc to use in both single-threaded and multi-threaded processes. Multi-threaded processes use the pthread_once() implementation from the threading library while single-threaded processes use a simplified "stub" version internal to libc. The libc stub-version of pthread_once() now also uses the simplified "stub" version as well instead of being a nop. Reviewed by: deischen, Matthew Fleming @ Isilon Suggested by: alc MFC after: 1 week
Diffstat (limited to 'lib/libc/gen/Makefile.inc')
-rw-r--r--lib/libc/gen/Makefile.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/Makefile.inc b/lib/libc/gen/Makefile.inc
index 0bdee9d..d6b403e 100644
--- a/lib/libc/gen/Makefile.inc
+++ b/lib/libc/gen/Makefile.inc
@@ -5,7 +5,8 @@
.PATH: ${.CURDIR}/${MACHINE_ARCH}/gen ${.CURDIR}/gen
SRCS+= __getosreldate.c __xuname.c \
- _pthread_stubs.c _rand48.c _spinlock_stub.c _thread_init.c \
+ _once_stub.c _pthread_stubs.c _rand48.c _spinlock_stub.c \
+ _thread_init.c \
alarm.c arc4random.c assert.c basename.c check_utility_compat.c \
clock.c closedir.c confstr.c \
crypt.c ctermid.c daemon.c devname.c dirname.c disklabel.c \
OpenPOWER on IntegriCloud