diff options
Diffstat (limited to 'usr/src/lib/libc/inc')
-rw-r--r-- | usr/src/lib/libc/inc/libc.h | 1 | ||||
-rw-r--r-- | usr/src/lib/libc/inc/mtlib.h | 3 | ||||
-rw-r--r-- | usr/src/lib/libc/inc/priv_private.h | 7 | ||||
-rw-r--r-- | usr/src/lib/libc/inc/synonyms.h | 2 | ||||
-rw-r--r-- | usr/src/lib/libc/inc/thr_uberdata.h | 6 |
5 files changed, 15 insertions, 4 deletions
diff --git a/usr/src/lib/libc/inc/libc.h b/usr/src/lib/libc/inc/libc.h index 65f68f7e2c..020c311eab 100644 --- a/usr/src/lib/libc/inc/libc.h +++ b/usr/src/lib/libc/inc/libc.h @@ -80,6 +80,7 @@ extern int _sigwait(sigset_t *); extern int _thr_getspecific(thread_key_t key, void **valuep); extern int _thr_setspecific(unsigned int key, void *value); extern int _thr_keycreate(thread_key_t *pkey, void (*destructor)(void *)); +extern int _thr_keycreate_once(thread_key_t *pkey, void (*destructor)(void *)); extern void *_pthread_getspecific(thread_key_t); extern int _pollsys(struct pollfd *, nfds_t, const timespec_t *, const sigset_t *); diff --git a/usr/src/lib/libc/inc/mtlib.h b/usr/src/lib/libc/inc/mtlib.h index 629b61ee9b..5d3fbf1451 100644 --- a/usr/src/lib/libc/inc/mtlib.h +++ b/usr/src/lib/libc/inc/mtlib.h @@ -20,7 +20,7 @@ */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -104,6 +104,7 @@ extern int _thr_kill(thread_t, int); extern int _thr_create(void *, size_t, void *(*)(void *), void *, long, thread_t *); extern int _thr_keycreate(thread_key_t *, void (*)(void *)); +extern int _thr_keycreate_once(thread_key_t *, void (*)(void *)); extern int _thr_setspecific(thread_key_t, void *); extern int _thr_getspecific(thread_key_t, void **); extern void *_pthread_getspecific(thread_key_t); diff --git a/usr/src/lib/libc/inc/priv_private.h b/usr/src/lib/libc/inc/priv_private.h index 573a3272c8..e33d22dc03 100644 --- a/usr/src/lib/libc/inc/priv_private.h +++ b/usr/src/lib/libc/inc/priv_private.h @@ -18,8 +18,9 @@ * * CDDL HEADER END */ + /* - * Copyright 2005 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -40,8 +41,8 @@ extern "C" { #endif -#define LOADPRIVDATA(d) if ((d = privdata) == NULL) d = __priv_getdata() -#define GETPRIVDATA() (privdata == NULL ? __priv_getdata() : privdata) +#define LOADPRIVDATA(d) d = __priv_getdata() +#define GETPRIVDATA() __priv_getdata() #define LOCKPRIVDATA() { \ /* Data already allocated */ \ (void) lock_data(); \ diff --git a/usr/src/lib/libc/inc/synonyms.h b/usr/src/lib/libc/inc/synonyms.h index 209d7f6063..b6782b3a59 100644 --- a/usr/src/lib/libc/inc/synonyms.h +++ b/usr/src/lib/libc/inc/synonyms.h @@ -762,6 +762,7 @@ extern "C" { #define pthread_getspecific _pthread_getspecific #define pthread_join _pthread_join #define pthread_key_create _pthread_key_create +#define pthread_key_create_once_np _pthread_key_create_once_np #define pthread_key_delete _pthread_key_delete #define pthread_kill _pthread_kill #define pthread_mutexattr_destroy _pthread_mutexattr_destroy @@ -1038,6 +1039,7 @@ extern "C" { #define thr_getstate _thr_getstate #define thr_join _thr_join #define thr_keycreate _thr_keycreate +#define thr_keycreate_once _thr_keycreate_once #define thr_kill _thr_kill #define thr_main _thr_main #define thr_min_stack _thr_min_stack diff --git a/usr/src/lib/libc/inc/thr_uberdata.h b/usr/src/lib/libc/inc/thr_uberdata.h index c03fb3fdcc..4b00040fcf 100644 --- a/usr/src/lib/libc/inc/thr_uberdata.h +++ b/usr/src/lib/libc/inc/thr_uberdata.h @@ -1289,6 +1289,11 @@ extern int __rwlock_init(rwlock_t *, int, void *); extern int rw_read_is_held(rwlock_t *); extern int rw_write_is_held(rwlock_t *); +extern void _membar_enter(void); +extern void _membar_exit(void); +extern void _membar_producer(void); +extern void _membar_consumer(void); + extern int _thr_continue(thread_t); extern int _thr_create(void *, size_t, void *(*)(void *), void *, long, thread_t *); @@ -1298,6 +1303,7 @@ extern int _thr_getprio(thread_t, int *); extern int _thr_getspecific(thread_key_t, void **); extern int _thr_join(thread_t, thread_t *, void **); extern int _thr_keycreate(thread_key_t *, PFrV); +extern int _thr_keycreate_once(thread_key_t *, PFrV); extern int _thr_key_delete(thread_key_t); extern int _thr_main(void); extern thread_t _thr_self(void); |