diff options
author | jasone <jasone@FreeBSD.org> | 2006-01-12 07:28:21 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2006-01-12 07:28:21 +0000 |
commit | 3668a2e4940ebe0e7c33729ad375a9a7b0c6ceb1 (patch) | |
tree | 25770955017440672d2cba68e6d8c382b53d9f75 /lib/libc/include | |
parent | 40e5b400fdbcc7db744cb07d18d2c5dcfdb6fd18 (diff) | |
download | FreeBSD-src-3668a2e4940ebe0e7c33729ad375a9a7b0c6ceb1.zip FreeBSD-src-3668a2e4940ebe0e7c33729ad375a9a7b0c6ceb1.tar.gz |
In preparation for a new malloc implementation:
* Add posix_memalign().
* Move calloc() from calloc.c to malloc.c. Add a calloc() implementation in
rtld-elf in order to make the loader happy (even though calloc() isn't
used in rtld-elf).
* Add _malloc_prefork() and _malloc_postfork(), and use them instead of
directly manipulating __malloc_lock.
Approved by: phk, markm (mentor)
Diffstat (limited to 'lib/libc/include')
-rw-r--r-- | lib/libc/include/libc_private.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index 8dca7a0..0959c6c 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -130,10 +130,11 @@ void _set_tp(void *tp); extern const char *__progname; /* - * This is the lock to make malloc() thread-safe. It is externalized - * so that thread libraries can protect malloc across fork(). + * These functions are used by the threading libraries in order to protect + * malloc across fork(). */ -extern struct _spinlock *__malloc_lock; +void _malloc_prefork(void); +void _malloc_postfork(void); /* * Function to clean up streams, called from abort() and exit(). |