Date: Fri, 20 Nov 2009 19:19:51 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: cvs-src-old@freebsd.org Subject: cvs commit: src/lib/libc/gen Makefile.inc _once_stub.c _pthread_stubs.c src/lib/libc/include libc_private.h Message-ID: <200911201920.nAKJK6a8037341@repoman.freebsd.org>
index | next in thread | raw e-mail
jhb 2009-11-20 19:19:51 UTC
FreeBSD src repository
Modified files:
lib/libc/gen Makefile.inc _pthread_stubs.c
lib/libc/include libc_private.h
Added files:
lib/libc/gen _once_stub.c
Log:
SVN rev 199606 on 2009-11-20 19:19:51Z by jhb
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
Revision Changes Path
1.149 +2 -1 src/lib/libc/gen/Makefile.inc
1.1 +67 -0 src/lib/libc/gen/_once_stub.c (new)
1.15 +1 -1 src/lib/libc/gen/_pthread_stubs.c
1.21 +8 -0 src/lib/libc/include/libc_private.h
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911201920.nAKJK6a8037341>
