From owner-cvs-src-old@FreeBSD.ORG Fri Nov 20 19:20:06 2009 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CC2F4106570A for ; Fri, 20 Nov 2009 19:20:06 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id B0DFD8FC17 for ; Fri, 20 Nov 2009 19:20:06 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id nAKJK6qc037342 for ; Fri, 20 Nov 2009 19:20:06 GMT (envelope-from jhb@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id nAKJK6a8037341 for cvs-src-old@freebsd.org; Fri, 20 Nov 2009 19:20:06 GMT (envelope-from jhb@repoman.freebsd.org) Message-Id: <200911201920.nAKJK6a8037341@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to jhb@repoman.freebsd.org using -f From: John Baldwin Date: Fri, 20 Nov 2009 19:19:51 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/gen Makefile.inc _once_stub.c _pthread_stubs.c src/lib/libc/include libc_private.h X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Nov 2009 19:20:06 -0000 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