diff options
| author | Dmitriy Ivanov <dimitry@google.com> | 2014-07-11 12:59:16 -0700 |
|---|---|---|
| committer | Dmitriy Ivanov <dimitry@google.com> | 2014-07-14 12:05:16 -0700 |
| commit | 53c3c271dc9927dd280981fc23409af60f460007 (patch) | |
| tree | 4a04122167583b9994204372bbc549a8174b9611 /libc/private/thread_private.h | |
| parent | 83ce99d8b7e2b15b2169e6e6e18e871ad35abb6c (diff) | |
| download | bionic-53c3c271dc9927dd280981fc23409af60f460007.zip bionic-53c3c271dc9927dd280981fc23409af60f460007.tar.gz bionic-53c3c271dc9927dd280981fc23409af60f460007.tar.bz2 | |
Upstream atexit
Change-Id: Ia454a2181b5058ed9783dc02b6b1805d0e4d2715
Diffstat (limited to 'libc/private/thread_private.h')
| -rw-r--r-- | libc/private/thread_private.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/libc/private/thread_private.h b/libc/private/thread_private.h index 724808a..b8b1a81 100644 --- a/libc/private/thread_private.h +++ b/libc/private/thread_private.h @@ -33,8 +33,12 @@ struct __thread_private_tag_t { #define _THREAD_PRIVATE_MUTEX_UNLOCK(name) \ pthread_mutex_unlock( &__THREAD_NAME(name)._private_lock ) -__LIBC_HIDDEN__ void _thread_atexit_lock(void); -__LIBC_HIDDEN__ void _thread_atexit_unlock(void); +/* Note that these aren't compatible with the usual OpenBSD ones which lazy-initialize! */ +#define _MUTEX_LOCK(l) pthread_mutex_lock((pthread_mutex_t*) l) +#define _MUTEX_UNLOCK(l) pthread_mutex_unlock((pthread_mutex_t*) l) + +__LIBC_HIDDEN__ void _thread_atexit_lock(void); +__LIBC_HIDDEN__ void _thread_atexit_unlock(void); #define _ATEXIT_LOCK() _thread_atexit_lock() #define _ATEXIT_UNLOCK() _thread_atexit_unlock() |
