Date: Wed, 4 Jun 1997 05:55:51 -0700 (PDT) From: John Birrell <jb@FreeBSD.ORG> To: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, cvs-lib@FreeBSD.ORG Subject: cvs commit: src/lib/libc/stdlib malloc.c Message-ID: <199706041255.FAA05760@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
jb 1997/06/04 05:55:50 PDT Modified files: lib/libc/stdlib malloc.c Log: Fix mutex initialization. Malloc cannot use pthread_mutex_init() to initialize a mutex because the mutex initialization process does a malloc! libc_r internals skip the malloc and assign an initializer to a static structure and point the opaque type (pthread_mutex_t in this case) to that structure. This is done on the assumption that the mutex will never be destroyed. This style of initialization is only valid inside libc_r because the structure that is assigned is opaque to the user. This fix allows a simple program to get to main() again. 8-) Revision Changes Path 1.24 +4 -6 src/lib/libc/stdlib/malloc.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199706041255.FAA05760>