cvs commit: src/include stdio.h src/lib/libc/gen _pthread_stubs.c src/lib/libc/stdio _flock_stub.c asprintf.c findfp.c fseek.c local.h refill.c snprintf.c sprintf.c sscanf.c ungetc.c vasprintf.c vfprintf.c vsnprintf.c vsprintf.c vsscanf.c

davidxu davidxu at freebsd.org
Mon May 9 06:37:16 PDT 2005


Joerg Sonnenberger wrote:
On Mon, May 09, 2005 at 05:43:40AM -0700, David Xu wrote:

 Log:
 Add locking for FILE.
 
 Obtained from: FreeBSD


Why can't this code use PTHREAD_MUTEX_RECURSIVE?

Joerg
Hmm, we don't create mutex at same time when FILE is created,
it will be created automatically by pthread_mutex_lock when
program is threaded, it is zero cost if program is single thread.
David Xu





More information about the Commits mailing list