diff options
| author | Jason Evans <je@fb.com> | 2011-03-23 00:03:58 (GMT) |
|---|---|---|
| committer | Jason Evans <je@fb.com> | 2011-03-23 00:03:58 (GMT) |
| commit | fb4e26aa9e3f5a02fa1527715a79b13aaf253b31 (patch) | |
| tree | fee87fada7bd70eed4b7859a63e2978035ffe7be /jemalloc/src/mutex.c | |
| parent | ad11ee6a3416e8d234c35670f20687d17545c09f (diff) | |
| parent | 4bcd987251826a7f9c49a1e2e6968bbb639a06c8 (diff) | |
| download | jemalloc-2.2.0.zip jemalloc-2.2.0.tar.gz jemalloc-2.2.0.tar.bz2 | |
Merge branch 'dev'2.2.0
Diffstat (limited to 'jemalloc/src/mutex.c')
| -rw-r--r-- | jemalloc/src/mutex.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/jemalloc/src/mutex.c b/jemalloc/src/mutex.c index 3ecb18a..ca89ef1 100644 --- a/jemalloc/src/mutex.c +++ b/jemalloc/src/mutex.c @@ -55,6 +55,9 @@ pthread_create(pthread_t *__restrict thread, bool malloc_mutex_init(malloc_mutex_t *mutex) { +#ifdef JEMALLOC_OSSPIN + *mutex = 0; +#else pthread_mutexattr_t attr; if (pthread_mutexattr_init(&attr) != 0) @@ -70,6 +73,7 @@ malloc_mutex_init(malloc_mutex_t *mutex) } pthread_mutexattr_destroy(&attr); +#endif return (false); } @@ -77,8 +81,10 @@ void malloc_mutex_destroy(malloc_mutex_t *mutex) { +#ifndef JEMALLOC_OSSPIN if (pthread_mutex_destroy(mutex) != 0) { malloc_write("<jemalloc>: Error in pthread_mutex_destroy()\n"); abort(); } +#endif } |
