diff options
author | jasone <jasone@FreeBSD.org> | 2007-11-27 03:16:44 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2007-11-27 03:16:44 +0000 |
commit | 21bb948195adb6636c33738cab39bb89cac41bc7 (patch) | |
tree | bc0c2019e6f4f8b5aa0d67d7e3517c626797bb0e /lib/libkse/thread/thr_cond.c | |
parent | 2dd595aefe6b80476344fe4fc8b7934db055aaa2 (diff) | |
download | FreeBSD-src-21bb948195adb6636c33738cab39bb89cac41bc7.zip FreeBSD-src-21bb948195adb6636c33738cab39bb89cac41bc7.tar.gz |
Add _pthread_mutex_init_calloc_cb() to libthr and libkse, so that malloc(3)
(part of libc) can use pthreads mutexes without causing infinite recursion
during initialization.
Diffstat (limited to 'lib/libkse/thread/thr_cond.c')
-rw-r--r-- | lib/libkse/thread/thr_cond.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libkse/thread/thr_cond.c b/lib/libkse/thread/thr_cond.c index 589f4b1..8e2582a 100644 --- a/lib/libkse/thread/thr_cond.c +++ b/lib/libkse/thread/thr_cond.c @@ -122,7 +122,7 @@ _pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *cond_attr) malloc(sizeof(struct pthread_cond))) == NULL) { rval = ENOMEM; } else if (_lock_init(&pcond->c_lock, LCK_ADAPTIVE, - _thr_lock_wait, _thr_lock_wakeup) != 0) { + _thr_lock_wait, _thr_lock_wakeup, calloc) != 0) { free(pcond); rval = ENOMEM; } else { |