diff options
| author | raf <none@none> | 2008-04-29 14:12:45 -0700 |
|---|---|---|
| committer | raf <none@none> | 2008-04-29 14:12:45 -0700 |
| commit | 8cd45542f2a452ca0dab13d8b2d5cfa876ccbebc (patch) | |
| tree | 0571ec3284912727f3d8ba667ed57b4cc6afb8cd /usr/src/lib/libc/port/threads/pthread.c | |
| parent | 31e69ea4bce567a03de57e063cb36ef69af61470 (diff) | |
| download | illumos-joyent-8cd45542f2a452ca0dab13d8b2d5cfa876ccbebc.tar.gz | |
6678310 using LD_AUDIT, ld.so.1 calls shared library's .init before library is fully relocated
6689238 libc needs global protection against ld.so.1
Diffstat (limited to 'usr/src/lib/libc/port/threads/pthread.c')
| -rw-r--r-- | usr/src/lib/libc/port/threads/pthread.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/usr/src/lib/libc/port/threads/pthread.c b/usr/src/lib/libc/port/threads/pthread.c index a1fb7dcb46..83cc7ec37a 100644 --- a/usr/src/lib/libc/port/threads/pthread.c +++ b/usr/src/lib/libc/port/threads/pthread.c @@ -164,16 +164,15 @@ _pthread_once(pthread_once_t *once_control, void (*init_routine)(void)) return (EINVAL); if (once->once_flag == PTHREAD_ONCE_NOTDONE) { - (void) _private_mutex_lock(&once->mlock); + (void) mutex_lock(&once->mlock); if (once->once_flag == PTHREAD_ONCE_NOTDONE) { - pthread_cleanup_push(_private_mutex_unlock, - &once->mlock); + pthread_cleanup_push(mutex_unlock, &once->mlock); (*init_routine)(); pthread_cleanup_pop(0); _membar_producer(); once->once_flag = PTHREAD_ONCE_DONE; } - (void) _private_mutex_unlock(&once->mlock); + (void) mutex_unlock(&once->mlock); } _membar_consumer(); |
