| /NextBSD/contrib/gcc/config/i386/ |
| HD | gthr-win32.c | 147 __gthr_win32_mutex_init_function (__gthread_mutex_t *mutex) in __gthr_win32_mutex_init_function() argument 149 mutex->counter = -1; in __gthr_win32_mutex_init_function() 150 mutex->sema = CreateSemaphore (NULL, 0, 65535, NULL); in __gthr_win32_mutex_init_function() 154 __gthr_win32_mutex_lock (__gthread_mutex_t *mutex) in __gthr_win32_mutex_lock() argument 156 if (InterlockedIncrement (&mutex->counter) == 0 || in __gthr_win32_mutex_lock() 157 WaitForSingleObject (mutex->sema, INFINITE) == WAIT_OBJECT_0) in __gthr_win32_mutex_lock() 163 InterlockedDecrement (&mutex->counter); in __gthr_win32_mutex_lock() 169 __gthr_win32_mutex_trylock (__gthread_mutex_t *mutex) in __gthr_win32_mutex_trylock() argument 171 if (__GTHR_W32_InterlockedCompareExchange (&mutex->counter, 0, -1) < 0) in __gthr_win32_mutex_trylock() 178 __gthr_win32_mutex_unlock (__gthread_mutex_t *mutex) in __gthr_win32_mutex_unlock() argument [all …]
|
| /NextBSD/contrib/gcc/ |
| HD | gthr-win32.h | 236 __gthread_objc_mutex_allocate (objc_mutex_t mutex) in __gthread_objc_mutex_allocate() argument 238 if ((mutex->backend = (void *) CreateMutex (NULL, 0, NULL)) == NULL) in __gthread_objc_mutex_allocate() 246 __gthread_objc_mutex_deallocate (objc_mutex_t mutex) in __gthread_objc_mutex_deallocate() argument 248 CloseHandle ((HANDLE) (mutex->backend)); in __gthread_objc_mutex_deallocate() 254 __gthread_objc_mutex_lock (objc_mutex_t mutex) in __gthread_objc_mutex_lock() argument 258 status = WaitForSingleObject ((HANDLE) (mutex->backend), INFINITE); in __gthread_objc_mutex_lock() 267 __gthread_objc_mutex_trylock (objc_mutex_t mutex) in __gthread_objc_mutex_trylock() argument 271 status = WaitForSingleObject ((HANDLE) (mutex->backend), 0); in __gthread_objc_mutex_trylock() 280 __gthread_objc_mutex_unlock (objc_mutex_t mutex) in __gthread_objc_mutex_unlock() argument 282 if (ReleaseMutex ((HANDLE) (mutex->backend)) == 0) in __gthread_objc_mutex_unlock() [all …]
|
| HD | gthr-nks.h | 177 __gthread_objc_mutex_allocate (objc_mutex_t mutex) in __gthread_objc_mutex_allocate() argument 181 if ((mutex->backend = NXMutexAlloc (0, 0, &info)) == NULL) in __gthread_objc_mutex_allocate() 188 __gthread_objc_mutex_deallocate (objc_mutex_t mutex) in __gthread_objc_mutex_deallocate() argument 190 while (NXMutexIsOwned ((NXMutex_t *)mutex->backend)) in __gthread_objc_mutex_deallocate() 191 NXUnlock ((NXMutex_t *)mutex->backend); in __gthread_objc_mutex_deallocate() 192 if (NXMutexFree ((NXMutex_t *)mutex->backend) != 0) in __gthread_objc_mutex_deallocate() 194 mutex->backend = NULL; in __gthread_objc_mutex_deallocate() 200 __gthread_objc_mutex_lock (objc_mutex_t mutex) in __gthread_objc_mutex_lock() argument 202 return NXLock ((NXMutex_t *)mutex->backend); in __gthread_objc_mutex_lock() 207 __gthread_objc_mutex_trylock (objc_mutex_t mutex) in __gthread_objc_mutex_trylock() argument [all …]
|
| HD | gthr-solaris.h | 50 mutex_t mutex; member 297 __gthread_objc_mutex_allocate (objc_mutex_t mutex) in __gthread_objc_mutex_allocate() argument 300 && __gthrw_(mutex_init) ((mutex_t *) (&(mutex->backend)), USYNC_THREAD, 0)) in __gthread_objc_mutex_allocate() 308 __gthread_objc_mutex_deallocate (objc_mutex_t mutex) in __gthread_objc_mutex_deallocate() argument 311 __gthrw_(mutex_destroy) ((mutex_t *) (&(mutex->backend))); in __gthread_objc_mutex_deallocate() 318 __gthread_objc_mutex_lock (objc_mutex_t mutex) in __gthread_objc_mutex_lock() argument 321 && __gthrw_(mutex_lock) ((mutex_t *) (&(mutex->backend))) != 0) in __gthread_objc_mutex_lock() 329 __gthread_objc_mutex_trylock (objc_mutex_t mutex) in __gthread_objc_mutex_trylock() argument 332 && __gthrw_(mutex_trylock) ((mutex_t *) (&(mutex->backend))) != 0) in __gthread_objc_mutex_trylock() 340 __gthread_objc_mutex_unlock (objc_mutex_t mutex) in __gthread_objc_mutex_unlock() argument [all …]
|
| HD | gthr-posix95.h | 385 __gthread_objc_mutex_allocate (objc_mutex_t mutex) in __gthread_objc_mutex_allocate() argument 389 mutex->backend = objc_malloc (sizeof (pthread_mutex_t)); in __gthread_objc_mutex_allocate() 391 if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL)) in __gthread_objc_mutex_allocate() 393 objc_free (mutex->backend); in __gthread_objc_mutex_allocate() 394 mutex->backend = NULL; in __gthread_objc_mutex_allocate() 404 __gthread_objc_mutex_deallocate (objc_mutex_t mutex) in __gthread_objc_mutex_deallocate() argument 417 count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend); in __gthread_objc_mutex_deallocate() 423 if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend)) in __gthread_objc_mutex_deallocate() 426 objc_free (mutex->backend); in __gthread_objc_mutex_deallocate() 427 mutex->backend = NULL; in __gthread_objc_mutex_deallocate() [all …]
|
| HD | gthr-rtems.h | 65 extern void rtems_gxx_mutex_init (__gthread_mutex_t *mutex); 66 extern int rtems_gxx_mutex_lock (__gthread_mutex_t *mutex); 67 extern int rtems_gxx_mutex_trylock (__gthread_mutex_t *mutex); 68 extern int rtems_gxx_mutex_unlock (__gthread_mutex_t *mutex); 71 extern void rtems_gxx_recursive_mutex_init (__gthread_recursive_mutex_t *mutex); 72 extern int rtems_gxx_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex); 73 extern int rtems_gxx_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex); 74 extern int rtems_gxx_recursive_mutex_unlock (__gthread_recursive_mutex_t *mutex); 115 __gthread_mutex_lock (__gthread_mutex_t *mutex) in __gthread_mutex_lock() argument 117 return rtems_gxx_mutex_lock (mutex); in __gthread_mutex_lock() [all …]
|
| HD | gthr-dce.h | 302 __gthread_objc_mutex_allocate (objc_mutex_t mutex) in __gthread_objc_mutex_allocate() argument 306 mutex->backend = objc_malloc (sizeof (pthread_mutex_t)); in __gthread_objc_mutex_allocate() 308 if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, in __gthread_objc_mutex_allocate() 311 objc_free (mutex->backend); in __gthread_objc_mutex_allocate() 312 mutex->backend = NULL; in __gthread_objc_mutex_allocate() 322 __gthread_objc_mutex_deallocate (objc_mutex_t mutex) in __gthread_objc_mutex_deallocate() argument 326 if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend)) in __gthread_objc_mutex_deallocate() 329 objc_free (mutex->backend); in __gthread_objc_mutex_deallocate() 330 mutex->backend = NULL; in __gthread_objc_mutex_deallocate() 338 __gthread_objc_mutex_lock (objc_mutex_t mutex) in __gthread_objc_mutex_lock() argument [all …]
|
| HD | gthr-vxworks.h | 54 __gthread_mutex_init_function (__gthread_mutex_t *mutex) in __gthread_mutex_init_function() argument 56 *mutex = semMCreate (SEM_Q_PRIORITY | SEM_INVERSION_SAFE | SEM_DELETE_SAFE); in __gthread_mutex_init_function() 60 __gthread_mutex_lock (__gthread_mutex_t *mutex) in __gthread_mutex_lock() argument 62 return semTake (*mutex, WAIT_FOREVER); in __gthread_mutex_lock() 66 __gthread_mutex_trylock (__gthread_mutex_t *mutex) in __gthread_mutex_trylock() argument 68 return semTake (*mutex, NO_WAIT); in __gthread_mutex_trylock() 72 __gthread_mutex_unlock (__gthread_mutex_t *mutex) in __gthread_mutex_unlock() argument 74 return semGive (*mutex); in __gthread_mutex_unlock() 78 __gthread_recursive_mutex_init_function (__gthread_recursive_mutex_t *mutex) in __gthread_recursive_mutex_init_function() argument 80 __gthread_mutex_init_function (mutex); in __gthread_recursive_mutex_init_function() [all …]
|
| HD | gthr-posix.h | 419 __gthread_objc_mutex_allocate (objc_mutex_t mutex) in __gthread_objc_mutex_allocate() argument 423 mutex->backend = objc_malloc (sizeof (pthread_mutex_t)); in __gthread_objc_mutex_allocate() 425 if (__gthrw_(pthread_mutex_init) ((pthread_mutex_t *) mutex->backend, NULL)) in __gthread_objc_mutex_allocate() 427 objc_free (mutex->backend); in __gthread_objc_mutex_allocate() 428 mutex->backend = NULL; in __gthread_objc_mutex_allocate() 438 __gthread_objc_mutex_deallocate (objc_mutex_t mutex) in __gthread_objc_mutex_deallocate() argument 451 count = __gthrw_(pthread_mutex_unlock) ((pthread_mutex_t *) mutex->backend); in __gthread_objc_mutex_deallocate() 457 if (__gthrw_(pthread_mutex_destroy) ((pthread_mutex_t *) mutex->backend)) in __gthread_objc_mutex_deallocate() 460 objc_free (mutex->backend); in __gthread_objc_mutex_deallocate() 461 mutex->backend = NULL; in __gthread_objc_mutex_deallocate() [all …]
|
| HD | gthr-single.h | 137 __gthread_objc_mutex_allocate (objc_mutex_t UNUSED(mutex)) in __gthread_objc_mutex_allocate() argument 144 __gthread_objc_mutex_deallocate (objc_mutex_t UNUSED(mutex)) in __gthread_objc_mutex_deallocate() argument 151 __gthread_objc_mutex_lock (objc_mutex_t UNUSED(mutex)) in __gthread_objc_mutex_lock() argument 159 __gthread_objc_mutex_trylock (objc_mutex_t UNUSED(mutex)) in __gthread_objc_mutex_trylock() argument 167 __gthread_objc_mutex_unlock (objc_mutex_t UNUSED(mutex)) in __gthread_objc_mutex_unlock() argument 191 objc_mutex_t UNUSED(mutex)) in __gthread_objc_condition_wait() argument 219 __gthread_mutex_lock (__gthread_mutex_t * UNUSED(mutex)) in __gthread_mutex_lock() argument 225 __gthread_mutex_trylock (__gthread_mutex_t * UNUSED(mutex)) in __gthread_mutex_trylock() argument 231 __gthread_mutex_unlock (__gthread_mutex_t * UNUSED(mutex)) in __gthread_mutex_unlock() argument 237 __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex) in __gthread_recursive_mutex_lock() argument [all …]
|
| HD | gthr-tpf.h | 148 __gthread_mutex_lock (__gthread_mutex_t *mutex) in __gthread_mutex_lock() argument 151 return __gthrw_(pthread_mutex_lock) (mutex); in __gthread_mutex_lock() 157 __gthread_mutex_trylock (__gthread_mutex_t *mutex) in __gthread_mutex_trylock() argument 160 return __gthrw_(pthread_mutex_trylock) (mutex); in __gthread_mutex_trylock() 166 __gthread_mutex_unlock (__gthread_mutex_t *mutex) in __gthread_mutex_unlock() argument 169 return __gthrw_(pthread_mutex_unlock) (mutex); in __gthread_mutex_unlock() 175 __gthread_recursive_mutex_lock (__gthread_recursive_mutex_t *mutex) in __gthread_recursive_mutex_lock() argument 178 return __gthread_mutex_lock (mutex); in __gthread_recursive_mutex_lock() 184 __gthread_recursive_mutex_trylock (__gthread_recursive_mutex_t *mutex) in __gthread_recursive_mutex_trylock() argument 187 return __gthread_mutex_trylock (mutex); in __gthread_recursive_mutex_trylock() [all …]
|
| /NextBSD/contrib/apr/locks/unix/ |
| HD | proc_mutex.c | 23 APR_DECLARE(apr_status_t) apr_proc_mutex_destroy(apr_proc_mutex_t *mutex) in apr_proc_mutex_destroy() argument 25 return apr_pool_cleanup_run(mutex->pool, mutex, apr_proc_mutex_cleanup); in apr_proc_mutex_destroy() 30 static apr_status_t proc_mutex_no_child_init(apr_proc_mutex_t **mutex, in proc_mutex_no_child_init() argument 46 apr_proc_mutex_t *mutex = mutex_; in proc_mutex_posix_cleanup() local 48 if (sem_close(mutex->psem_interproc) < 0) { in proc_mutex_posix_cleanup() 145 static apr_status_t proc_mutex_posix_acquire(apr_proc_mutex_t *mutex) in proc_mutex_posix_acquire() argument 150 rc = sem_wait(mutex->psem_interproc); in proc_mutex_posix_acquire() 155 mutex->curr_locked = 1; in proc_mutex_posix_acquire() 159 static apr_status_t proc_mutex_posix_tryacquire(apr_proc_mutex_t *mutex) in proc_mutex_posix_tryacquire() argument 164 rc = sem_trywait(mutex->psem_interproc); in proc_mutex_posix_tryacquire() [all …]
|
| HD | global_mutex.c | 45 APR_DECLARE(apr_status_t) apr_global_mutex_create(apr_global_mutex_t **mutex, in apr_global_mutex_create() argument 77 *mutex = m; in apr_global_mutex_create() 82 apr_global_mutex_t **mutex, in apr_global_mutex_child_init() argument 88 rv = apr_proc_mutex_child_init(&((*mutex)->proc_mutex), fname, pool); in apr_global_mutex_child_init() 92 APR_DECLARE(apr_status_t) apr_global_mutex_lock(apr_global_mutex_t *mutex) in apr_global_mutex_lock() argument 97 if (mutex->thread_mutex) { in apr_global_mutex_lock() 98 rv = apr_thread_mutex_lock(mutex->thread_mutex); in apr_global_mutex_lock() 105 rv = apr_proc_mutex_lock(mutex->proc_mutex); in apr_global_mutex_lock() 109 if (mutex->thread_mutex) { in apr_global_mutex_lock() 110 (void)apr_thread_mutex_unlock(mutex->thread_mutex); in apr_global_mutex_lock() [all …]
|
| HD | thread_mutex.c | 25 apr_thread_mutex_t *mutex = data; in thread_mutex_cleanup() local 28 rv = pthread_mutex_destroy(&mutex->mutex); in thread_mutex_cleanup() 37 APR_DECLARE(apr_status_t) apr_thread_mutex_create(apr_thread_mutex_t **mutex, in apr_thread_mutex_create() argument 66 rv = pthread_mutex_init(&new_mutex->mutex, &mattr); in apr_thread_mutex_create() 71 rv = pthread_mutex_init(&new_mutex->mutex, NULL); in apr_thread_mutex_create() 84 *mutex = new_mutex; in apr_thread_mutex_create() 88 APR_DECLARE(apr_status_t) apr_thread_mutex_lock(apr_thread_mutex_t *mutex) in apr_thread_mutex_lock() argument 92 rv = pthread_mutex_lock(&mutex->mutex); in apr_thread_mutex_lock() 102 APR_DECLARE(apr_status_t) apr_thread_mutex_trylock(apr_thread_mutex_t *mutex) in apr_thread_mutex_trylock() argument 106 rv = pthread_mutex_trylock(&mutex->mutex); in apr_thread_mutex_trylock() [all …]
|
| /NextBSD/contrib/openbsm/libbsm/ |
| HD | bsm_control.c | 66 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 323 pthread_mutex_lock(&mutex); in setac() 327 pthread_mutex_unlock(&mutex); in setac() 339 pthread_mutex_lock(&mutex); in endac() 347 pthread_mutex_unlock(&mutex); in endac() 365 pthread_mutex_lock(&mutex); in getacdir() 375 pthread_mutex_unlock(&mutex); in getacdir() 381 pthread_mutex_unlock(&mutex); in getacdir() 387 pthread_mutex_unlock(&mutex); in getacdir() 393 pthread_mutex_unlock(&mutex); in getacdir() [all …]
|
| /NextBSD/contrib/xz/src/common/ |
| HD | mythread.h | 51 #define mythread_sync(mutex) mythread_sync_helper1(mutex, __LINE__) argument 52 #define mythread_sync_helper1(mutex, line) mythread_sync_helper2(mutex, line) argument 53 #define mythread_sync_helper2(mutex, line) \ argument 56 ? (mythread_mutex_unlock(&(mutex)), 0) \ 57 : (mythread_mutex_lock(&(mutex)), 1); \ 179 mythread_mutex_init(mythread_mutex *mutex) in mythread_mutex_init() argument 181 return pthread_mutex_init(mutex, NULL); in mythread_mutex_init() 185 mythread_mutex_destroy(mythread_mutex *mutex) in mythread_mutex_destroy() argument 187 int ret = pthread_mutex_destroy(mutex); in mythread_mutex_destroy() 193 mythread_mutex_lock(mythread_mutex *mutex) in mythread_mutex_lock() argument [all …]
|
| /NextBSD/contrib/jemalloc/src/ |
| HD | mutex.c | 67 JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, 72 _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, in _pthread_mutex_init_calloc_cb() argument 77 __libc_interposing[INTERPOS__pthread_mutex_init_calloc_cb])(mutex, in _pthread_mutex_init_calloc_cb() 83 malloc_mutex_init(malloc_mutex_t *mutex) in malloc_mutex_init() argument 88 InitializeSRWLock(&mutex->lock); in malloc_mutex_init() 90 if (!InitializeCriticalSectionAndSpinCount(&mutex->lock, in malloc_mutex_init() 95 mutex->lock = 0; in malloc_mutex_init() 98 mutex->postponed_next = postponed_mutexes; in malloc_mutex_init() 99 postponed_mutexes = mutex; in malloc_mutex_init() 101 if (_pthread_mutex_init_calloc_cb(&mutex->lock, in malloc_mutex_init() [all …]
|
| /NextBSD/contrib/jemalloc/include/jemalloc/internal/ |
| HD | mutex.h | 52 bool malloc_mutex_init(malloc_mutex_t *mutex); 53 void malloc_mutex_prefork(malloc_mutex_t *mutex); 54 void malloc_mutex_postfork_parent(malloc_mutex_t *mutex); 55 void malloc_mutex_postfork_child(malloc_mutex_t *mutex); 64 void malloc_mutex_lock(malloc_mutex_t *mutex); 65 void malloc_mutex_unlock(malloc_mutex_t *mutex); 70 malloc_mutex_lock(malloc_mutex_t *mutex) in malloc_mutex_lock() argument 76 AcquireSRWLockExclusive(&mutex->lock); in malloc_mutex_lock() 78 EnterCriticalSection(&mutex->lock); in malloc_mutex_lock() 81 OSSpinLockLock(&mutex->lock); in malloc_mutex_lock() [all …]
|
| /NextBSD/contrib/subversion/subversion/libsvn_subr/ |
| HD | mutex.c | 40 apr_thread_mutex_t *mutex; member 61 svn_mutex__t *mutex = apr_pcalloc(result_pool, sizeof(*mutex)); in svn_mutex__init() local 65 apr_thread_mutex_create(&mutex->mutex, in svn_mutex__init() 72 *mutex_p = mutex; in svn_mutex__init() 79 svn_mutex__lock(svn_mutex__t *mutex) in svn_mutex__lock() argument 81 if (mutex) in svn_mutex__lock() 84 apr_status_t status = apr_thread_mutex_lock(mutex->mutex); in svn_mutex__lock() 94 svn_mutex__unlock(svn_mutex__t *mutex, in svn_mutex__unlock() argument 97 if (mutex) in svn_mutex__unlock() 100 apr_status_t status = apr_thread_mutex_unlock(mutex->mutex); in svn_mutex__unlock()
|
| /NextBSD/contrib/netbsd-tests/lib/libpthread/ |
| HD | t_mutex.c | 43 static pthread_mutex_t mutex; variable 56 pthread_mutex_lock(&mutex); in mutex1_threadfunc() 61 pthread_mutex_unlock(&mutex); in mutex1_threadfunc() 79 PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); in ATF_TC_BODY() 81 PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); in ATF_TC_BODY() 88 PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); in ATF_TC_BODY() 92 PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); in ATF_TC_BODY() 97 PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); in ATF_TC_BODY() 108 PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); in mutex2_threadfunc() 110 PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); in mutex2_threadfunc() [all …]
|
| /NextBSD/contrib/llvm/lib/Support/ |
| HD | Mutex.cpp | 48 pthread_mutex_t* mutex = in MutexImpl() local 63 errorcode = pthread_mutex_init(mutex, &attr); in MutexImpl() 71 data_ = mutex; in MutexImpl() 77 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); in ~MutexImpl() local 78 assert(mutex != nullptr); in ~MutexImpl() 79 pthread_mutex_destroy(mutex); in ~MutexImpl() 80 free(mutex); in ~MutexImpl() 86 pthread_mutex_t* mutex = static_cast<pthread_mutex_t*>(data_); in acquire() local 87 assert(mutex != nullptr); in acquire() 89 int errorcode = pthread_mutex_lock(mutex); in acquire() [all …]
|
| /NextBSD/contrib/apr/atomic/unix/ |
| HD | mutex.c | 78 apr_thread_mutex_t *mutex = hash_mutex[ATOMIC_HASH(mem)]; in mutex_hash() local 80 if (apr_thread_mutex_lock(mutex) != APR_SUCCESS) { in mutex_hash() 84 return mutex; in mutex_hash() 103 DECLARE_MUTEX_LOCKED(mutex, mem); in apr_atomic_set32() 107 MUTEX_UNLOCK(mutex); in apr_atomic_set32() 113 DECLARE_MUTEX_LOCKED(mutex, mem); in apr_atomic_add32() 118 MUTEX_UNLOCK(mutex); in apr_atomic_add32() 125 DECLARE_MUTEX_LOCKED(mutex, mem); in apr_atomic_sub32() 127 MUTEX_UNLOCK(mutex); in apr_atomic_sub32() 138 DECLARE_MUTEX_LOCKED(mutex, mem); in apr_atomic_dec32() [all …]
|
| /NextBSD/lib/libthr/thread/ |
| HD | thr_mutex.c | 77 int __pthread_mutex_init(pthread_mutex_t *mutex, 79 int __pthread_mutex_trylock(pthread_mutex_t *mutex); 80 int __pthread_mutex_lock(pthread_mutex_t *mutex); 81 int __pthread_mutex_timedlock(pthread_mutex_t *mutex, 83 int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, 85 int _pthread_mutex_getspinloops_np(pthread_mutex_t *mutex, int *count); 86 int _pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); 87 int __pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); 88 int _pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count); 89 int _pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count); [all …]
|
| /NextBSD/contrib/gcclibs/libgomp/config/linux/ |
| HD | mutex.h | 39 static inline void gomp_mutex_init (gomp_mutex_t *mutex) in gomp_mutex_init() argument 41 *mutex = 0; in gomp_mutex_init() 44 extern void gomp_mutex_lock_slow (gomp_mutex_t *mutex); 45 static inline void gomp_mutex_lock (gomp_mutex_t *mutex) in gomp_mutex_lock() argument 47 if (!__sync_bool_compare_and_swap (mutex, 0, 1)) in gomp_mutex_lock() 48 gomp_mutex_lock_slow (mutex); in gomp_mutex_lock() 51 extern void gomp_mutex_unlock_slow (gomp_mutex_t *mutex); 52 static inline void gomp_mutex_unlock (gomp_mutex_t *mutex) in gomp_mutex_unlock() argument 54 int val = __sync_lock_test_and_set (mutex, 0); in gomp_mutex_unlock() 56 gomp_mutex_unlock_slow (mutex); in gomp_mutex_unlock() [all …]
|
| /NextBSD/sys/fs/nfsserver/ |
| HD | nfs_nfsdcache.c | 375 struct mtx *mutex; in nfsrc_getudp() local 377 mutex = nfsrc_cachemutex(newrp); in nfsrc_getudp() 380 mtx_lock(mutex); in nfsrc_getudp() 388 (void)mtx_sleep(rp, mutex, (PZERO - 1) | PDROP, in nfsrc_getudp() 399 mtx_unlock(mutex); in nfsrc_getudp() 406 mtx_unlock(mutex); in nfsrc_getudp() 414 mtx_unlock(mutex); in nfsrc_getudp() 444 mtx_unlock(mutex); in nfsrc_getudp() 462 struct mtx *mutex; in nfsrvd_updatecache() local 468 mutex = nfsrc_cachemutex(rp); in nfsrvd_updatecache() [all …]
|