cvs commit: src/lib/libc/stdlib malloc.c src/lib/libc/include
libc_private.h
Daniel Eischen
deischen at FreeBSD.org
Tue Nov 4 11:49:57 PST 2003
deischen 2003/11/04 11:49:56 PST
FreeBSD src repository
Modified files:
lib/libc/stdlib malloc.c
lib/libc/include libc_private.h
Log:
Externalize malloc's spinlock so that a thread library can take
it around an application's fork() call. Our new thread libraries
(libthr, libpthread) can now have threads running while another
thread calls fork(). In this case, it is possible for malloc
to be left in an inconsistent state in the child. Our thread
libraries, libpthread in particular, need to use malloc internally
after a fork (in the child).
Reviewed by: davidxu
Revision Changes Path
1.10 +8 -0 src/lib/libc/include/libc_private.h
1.83 +1 -0 src/lib/libc/stdlib/malloc.c
More information about the cvs-src
mailing list