| /freebsd-src/share/man/man9/ |
| H A D | mutex.9 | 28 .\" from BSDI $Id: mutex.4,v 1.1.2.3 1998/04/27 22:53:13 ewv Exp $ 34 .Nm mutex , 61 .Fn mtx_init "struct mtx *mutex" "const char *name" "const char *type" "int opts" 63 .Fn mtx_destroy "struct mtx *mutex" 65 .Fn mtx_lock "struct mtx *mutex" 67 .Fn mtx_lock_spin "struct mtx *mutex" 69 .Fn mtx_lock_flags "struct mtx *mutex" "int flags" 71 .Fn mtx_lock_spin_flags "struct mtx *mutex" "int flags" 73 .Fn mtx_trylock "struct mtx *mutex" 75 .Fn mtx_trylock_flags "struct mtx *mutex" "int flags" [all …]
|
| H A D | mtx_pool.9 | 41 .Nd "mutex pool routines" 63 Mutex pools are designed to be used as short term leaf mutexes; 64 i.e., the last mutex one might acquire before calling 67 A mutex may be chosen from the pool based on a supplied pointer, 69 or the caller may allocate an arbitrary shared mutex from the pool 70 and save the returned mutex pointer for later use. 74 mutex pool, 80 mutex pool are similar, except that they are initialized with the MTX_NOWITNESS 82 Other mutex pools may be created that contain mutexes with different 92 Specifically, if one has a private mutex [all …]
|
| /freebsd-src/contrib/jemalloc/include/jemalloc/internal/ |
| H A D | mutex.h | 10 /* Can only acquire one mutex of a given witness rank at a time. */ 25 * bouncing: the data is not touched by the mutex holder 27 * contenders. Having it before the mutex itself could 106 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT), 0} 110 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} 116 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT), 0} 120 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} 128 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT), 0} 132 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)} 140 bool malloc_mutex_init(malloc_mutex_t *mutex, const char *name, [all …]
|
| /freebsd-src/sys/contrib/device-tree/Bindings/soc/mediatek/ |
| H A D | mediatek,mutex.yaml | 4 $id: http://devicetree.org/schemas/soc/mediatek/mediatek,mutex.yaml# 7 title: Mediatek mutex 14 Mediatek mutex, namely MUTEX, is used to send the triggers signals called 17 In some SoC, such as mt2701, MUTEX could be a hardware mutex which protects 19 MUTEX device node must be siblings to the central MMSYS_CONFIG node. 27 - mediatek,mt2701-disp-mutex 28 - mediatek,mt2712-disp-mutex 29 - mediatek,mt6795-disp-mutex [all...] |
| /freebsd-src/sys/contrib/dev/acpica/components/executer/ |
| H A D | exmutex.c | 3 * Module Name: exmutex - ASL Mutex Acquire/Release functions 172 * PARAMETERS: ObjDesc - The mutex to be unlinked 176 * DESCRIPTION: Remove a mutex from the "AcquiredMutex" list 184 ACPI_THREAD_STATE *Thread = ObjDesc->Mutex.OwnerThread; in AcpiExUnlinkMutex() 194 if (ObjDesc->Mutex.Next) in AcpiExUnlinkMutex() 196 (ObjDesc->Mutex.Next)->Mutex.Prev = ObjDesc->Mutex.Prev; in AcpiExUnlinkMutex() 199 if (ObjDesc->Mutex.Prev) in AcpiExUnlinkMutex() 201 (ObjDesc->Mutex in AcpiExUnlinkMutex() [all...] |
| /freebsd-src/contrib/jemalloc/src/ |
| H A D | mutex.c | 42 JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, 47 _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, in _pthread_mutex_init_calloc_cb() argument 52 __libc_interposing[INTERPOS__pthread_mutex_init_calloc_cb])(mutex, in _pthread_mutex_init_calloc_cb() 58 malloc_mutex_lock_slow(malloc_mutex_t *mutex) { in malloc_mutex_lock_slow() argument 59 mutex_prof_data_t *data = &mutex->prof_data; in malloc_mutex_lock_slow() 69 if (!atomic_load_b(&mutex->locked, ATOMIC_RELAXED) in malloc_mutex_lock_slow() 70 && !malloc_mutex_trylock_final(mutex)) { in malloc_mutex_lock_slow() 78 malloc_mutex_lock_final(mutex); in malloc_mutex_lock_slow() 89 if (!malloc_mutex_trylock_final(mutex)) { in malloc_mutex_lock_slow() 96 malloc_mutex_lock_final(mutex); in malloc_mutex_lock_slow() [all …]
|
| /freebsd-src/contrib/netbsd-tests/lib/libpthread/ |
| H A D | t_mutex.c | 52 static pthread_mutex_t mutex; variable 89 printf("2: Locking mutex\n"); in mutex1_threadfunc() 90 mutex_lock(&mutex, &ts_lengthy); in mutex1_threadfunc() 91 printf("2: Got mutex. *param = %d\n", *param); in mutex1_threadfunc() 95 pthread_mutex_unlock(&mutex); in mutex1_threadfunc() 111 printf("1: Mutex-test 1\n"); in ATF_TC_BODY() 113 PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); in ATF_TC_BODY() 115 PTHREAD_REQUIRE(mutex_lock(&mutex, &ts_lengthy)); in ATF_TC_BODY() 120 printf("1: Before releasing the mutex.\n"); in ATF_TC_BODY() 122 PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); in ATF_TC_BODY() [all …]
|
| H A D | t_cond.c | 45 static pthread_mutex_t mutex; variable 58 printf("2: Locking mutex\n"); in signal_delay_wait_threadfunc() 59 PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); in signal_delay_wait_threadfunc() 60 printf("2: Got mutex.\n"); in signal_delay_wait_threadfunc() 64 PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); in signal_delay_wait_threadfunc() 83 PTHREAD_REQUIRE(pthread_mutex_init(&mutex, NULL)); in ATF_TC_BODY() 86 PTHREAD_REQUIRE(pthread_mutex_lock(&mutex)); in ATF_TC_BODY() 96 PTHREAD_REQUIRE(pthread_cond_wait(&cond, &mutex)); in ATF_TC_BODY() 102 PTHREAD_REQUIRE(pthread_mutex_unlock(&mutex)); in ATF_TC_BODY() 104 printf("1: After releasing the mutex.\n"); in ATF_TC_BODY() [all …]
|
| /freebsd-src/sys/contrib/device-tree/Bindings/display/mediatek/ |
| H A D | mediatek,mutex.yaml | 4 $id: http://devicetree.org/schemas/display/mediatek/mediatek,mutex.yaml# 7 title: Mediatek mutex 14 Mediatek mutex, namely MUTEX, is used to send the triggers signals called 17 In some SoC, such as mt2701, MUTEX could be a hardware mutex which protects 19 MUTEX device node must be siblings to the central MMSYS_CONFIG node. 27 - mediatek,mt2701-disp-mutex 28 - mediatek,mt2712-disp-mutex 29 - mediatek,mt8167-disp-mutex 30 - mediatek,mt8173-disp-mutex 31 - mediatek,mt8183-disp-mutex [all …]
|
| /freebsd-src/share/man/man3/ |
| H A D | pthread.3 | 58 Mutex Routines 232 .Ss Mutex Routines 238 Destroy a mutex attributes object. 243 Obtain priority ceiling attribute of mutex attribute object. 248 Obtain protocol attribute of mutex attribute object. 253 Obtain the mutex type attribute in the specified mutex attributes object. 258 Initialize a mutex attributes object with default values. 263 Set priority ceiling attribute of mutex attribute object. 268 Set protocol attribute of mutex attribute object. 273 Set the mutex type attribute that is used when a mutex is created. [all …]
|
| H A D | pthread_mutex_consistent.3 | 33 .Nd mark state protected by robust mutex as consistent 39 .Fn pthread_mutex_consistent "pthread_mutex_t *mutex" 41 If the process containing the thread owning a robust mutex terminates 42 while holding the mutex, the mutex becomes inconsistent and the next thread 43 that acquires the mutex lock is notified of the state by the return value 45 In this case, the mutex does not become normally usable again until 51 .Fa mutex 52 argument, which points to the initialized robust mutex in an 53 inconsistent state, marks the by mutex a [all...] |
| H A D | pthread_mutexattr.3 | 48 .Nd mutex attribute operations 90 Mutex attributes are used to specify parameters to 100 with all the default mutex attributes. 109 function sets the priority ceiling for the mutex, used 122 Priority and scheduling of the thread owning this mutex is not 123 affected by its mutex ownership. 125 Request priority-inheritance protocol, where the thread owning the mutex 127 on any mutex owned by this thread. 129 Request priority-inheritance protocol, where the thread owning the mutex 131 all threads waiting on any mutex owne [all...] |
| H A D | pthread_mutex_timedlock.3 | 30 .Nd lock a mutex without blocking indefinitely 37 .Fn pthread_mutex_timedlock "pthread_mutex_t *restrict mutex" "const struct timespec *restrict abs_… 42 .Fa mutex . 44 the mutex becomes available or 62 .Fa mutex 66 mutex's current priority ceiling. 74 .Fa mutex 78 .Fa mutex 82 .Fa mutex 85 .Fa mutex [all …]
|
| H A D | pthread_mutex_trylock.3 | 33 .Nd attempt to lock a mutex without blocking 39 .Fn pthread_mutex_trylock "pthread_mutex_t *mutex" 44 .Fa mutex . 45 If the mutex is already locked, 47 will not block waiting for the mutex, but will return an error condition. 60 .Fa mutex 63 .Fa Mutex 67 .Fa mutex 68 points to a robust mutex and the process containing the previous owning 69 thread terminated while holding the mutex lock. [all …]
|
| /freebsd-src/lib/libthr/thread/ |
| H A D | thr_mutex.c | 65 int __pthread_mutex_timedlock(pthread_mutex_t * __restrict mutex, 67 int _pthread_mutex_getspinloops_np(pthread_mutex_t *mutex, int *count); 68 int _pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); 69 int __pthread_mutex_setspinloops_np(pthread_mutex_t *mutex, int count); 70 int _pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count); 71 int _pthread_mutex_getyieldloops_np(pthread_mutex_t *mutex, int *count); 72 int __pthread_mutex_setyieldloops_np(pthread_mutex_t *mutex, int count); 137 PANIC("mutex %p own %#x is not on list %p %p", in mutex_assert_is_owned() 150 PANIC("mutex %p own %#x is on list %p %p", in mutex_assert_not_owned() 159 "mutex in mutex_assert_not_owned() 275 mutex_init(pthread_mutex_t * mutex,const struct pthread_mutex_attr * mutex_attr,void * (calloc_cb)(size_t,size_t)) mutex_init() argument 300 init_static(struct pthread * thread,pthread_mutex_t * mutex) init_static() argument 378 __Tthr_mutex_init(pthread_mutex_t * __restrict mutex,const pthread_mutexattr_t * __restrict mutex_attr) __Tthr_mutex_init() argument 407 _pthread_mutex_init_calloc_cb(pthread_mutex_t * mutex,void * (calloc_cb)(size_t,size_t)) _pthread_mutex_init_calloc_cb() argument 462 _thr_mutex_destroy(pthread_mutex_t * mutex) _thr_mutex_destroy() argument 590 check_and_init_mutex(pthread_mutex_t * mutex,struct pthread_mutex ** m) check_and_init_mutex() argument 615 __Tthr_mutex_trylock(pthread_mutex_t * mutex) __Tthr_mutex_trylock() argument 744 __Tthr_mutex_lock(pthread_mutex_t * mutex) __Tthr_mutex_lock() argument 757 __pthread_mutex_timedlock(pthread_mutex_t * __restrict mutex,const struct timespec * __restrict abstime) __pthread_mutex_timedlock() argument 771 _thr_mutex_unlock(pthread_mutex_t * mutex) _thr_mutex_unlock() argument 1005 _pthread_mutex_getprioceiling(const pthread_mutex_t * __restrict mutex,int * __restrict prioceiling) _pthread_mutex_getprioceiling() argument 1027 _pthread_mutex_setprioceiling(pthread_mutex_t * __restrict mutex,int ceiling,int * __restrict old_ceiling) _pthread_mutex_setprioceiling() argument 1094 _pthread_mutex_getspinloops_np(pthread_mutex_t * mutex,int * count) _pthread_mutex_getspinloops_np() argument 1106 __pthread_mutex_setspinloops_np(pthread_mutex_t * mutex,int count) __pthread_mutex_setspinloops_np() argument 1118 _pthread_mutex_getyieldloops_np(pthread_mutex_t * mutex,int * count) _pthread_mutex_getyieldloops_np() argument 1130 __pthread_mutex_setyieldloops_np(pthread_mutex_t * mutex,int count) __pthread_mutex_setyieldloops_np() argument 1142 _pthread_mutex_isowned_np(pthread_mutex_t * mutex) _pthread_mutex_isowned_np() argument 1174 _Tthr_mutex_consistent(pthread_mutex_t * mutex) _Tthr_mutex_consistent() argument [all...] |
| /freebsd-src/contrib/xz/src/common/ |
| H A D | mythread.h | 30 // Locks a mutex for a duration of a block. 32 // Perform mythread_mutex_lock(&mutex) in the beginning of a block 33 // and mythread_mutex_unlock(&mutex) at the end of the block. "break" 34 // may be used to unlock the mutex and jump out of the block. 39 // mythread_sync(mutex) { 47 // things down at all compared to plain mythread_mutex_lock(&mutex) 48 // and mythread_mutex_unlock(&mutex) calls. 50 #define mythread_sync(mutex) mythread_sync_helper1(mutex, __LINE__) argument 51 #define mythread_sync_helper1(mutex, line) mythread_sync_helper2(mutex, line) argument 52 #define mythread_sync_helper2(mutex, line) \ argument [all …]
|
| /freebsd-src/sys/contrib/dev/rtw89/ |
| H A D | mac80211.c | 62 mutex_lock(&rtwdev->mutex); in rtw89_ops_start() 64 mutex_unlock(&rtwdev->mutex); in rtw89_ops_start() 73 mutex_lock(&rtwdev->mutex); in rtw89_ops_stop() 75 mutex_unlock(&rtwdev->mutex); in rtw89_ops_stop() 85 mutex_lock(&rtwdev->mutex); in rtw89_ops_config() 103 mutex_unlock(&rtwdev->mutex); in rtw89_ops_config() 118 mutex_lock(&rtwdev->mutex); in rtw89_ops_add_interface() 167 mutex_unlock(&rtwdev->mutex); in rtw89_ops_add_interface() 184 mutex_lock(&rtwdev->mutex); in rtw89_ops_remove_interface() 193 mutex_unlock(&rtwdev->mutex); in rtw89_ops_remove_interface() [all...] |
| /freebsd-src/contrib/openbsm/libbsm/ |
| H A D | bsm_control.c | 61 * parameters. These static fields are protected by 'mutex'. 71 static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; variable 104 * Must be called with mutex held. 324 pthread_mutex_lock(&mutex); in setac() 328 pthread_mutex_unlock(&mutex); in setac() 340 pthread_mutex_lock(&mutex); in endac() 348 pthread_mutex_unlock(&mutex); in endac() 366 pthread_mutex_lock(&mutex); in getacdir() 376 pthread_mutex_unlock(&mutex); in getacdir() 382 pthread_mutex_unlock(&mutex); in getacdir() [all …]
|
| /freebsd-src/contrib/llvm-project/compiler-rt/lib/gwp_asan/ |
| H A D | mutex.h | 1 //===-- mutex.h -------------------------------------------------*- C++ -*-===// 16 class Mutex final : PlatformMutex { 18 constexpr Mutex() = default; 19 ~Mutex() = default; 20 Mutex(const Mutex &) = delete; 21 Mutex &operator=(const Mutex &) = delete; 22 // Lock the mutex. 24 // Nonblocking trylock of the mutex. Returns true if the lock was acquired. 26 // Unlock the mutex. 32 explicit ScopedLock(Mutex &Mx) : Mu(Mx) { Mu.lock(); } in ScopedLock() [all …]
|
| /freebsd-src/contrib/llvm-project/libcxx/src/ |
| H A D | mutex.cpp | 13 #include <mutex> 26 // ~mutex is defined elsewhere 28 void mutex::lock() { in lock() 31 __throw_system_error(ec, "mutex lock failed"); in lock() 34 bool mutex::try_lock() noexcept { return __libcpp_mutex_trylock(&__m_); } in try_lock() 36 void mutex::unlock() noexcept { in unlock() 40 ec == 0, "call to mutex::unlock failed. A possible reason is that the mutex wasn't locked"); in unlock() 67 …e == 0, "call to recursive_mutex::unlock() failed. A possible reason is that the mutex wasn't lock… in unlock() 76 timed_mutex::~timed_mutex() { lock_guard<mutex> _(__m_); } in ~timed_mutex() 79 unique_lock<mutex> lk(__m_); in lock() [all …]
|
| H A D | mutex_destructor.cpp | 9 // Define ~mutex. 11 // On some platforms ~mutex has been made trivial and the definition is only 15 // that *nothing* sees the non-trivial mutex declaration. For this reason 29 class _LIBCPP_EXPORTED_FROM_ABI mutex { class 33 _LIBCPP_ALWAYS_INLINE _LIBCPP_HIDE_FROM_ABI constexpr mutex() = default; 34 mutex(const mutex&) = delete; 35 mutex& operator=(const mutex&) = delete; 36 ~mutex() noexcep [all...] |
| /freebsd-src/sys/contrib/device-tree/Bindings/hwlock/ |
| H A D | qcom-hwspinlock.yaml | 7 title: Qualcomm Hardware Mutex Block 20 - qcom,sfpb-mutex 21 - qcom,tcsr-mutex 24 - qcom,apq8084-tcsr-mutex 25 - qcom,ipq6018-tcsr-mutex 26 - qcom,msm8226-tcsr-mutex 27 - qcom,msm8994-tcsr-mutex 28 - const: qcom,tcsr-mutex 31 - qcom,msm8974-tcsr-mutex 32 - const: qcom,tcsr-mutex [all …]
|
| /freebsd-src/sys/contrib/dev/rtw88/ |
| H A D | mac80211.c | 58 mutex_lock(&rtwdev->mutex); in rtw_ops_start() 60 mutex_unlock(&rtwdev->mutex); in rtw_ops_start() 69 mutex_lock(&rtwdev->mutex); in rtw_ops_stop() 71 mutex_unlock(&rtwdev->mutex); in rtw_ops_stop() 82 mutex_lock(&rtwdev->mutex); in rtw_ops_config() 104 mutex_unlock(&rtwdev->mutex); in rtw_ops_config() 168 mutex_lock(&rtwdev->mutex); in rtw_ops_add_interface() 172 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface() 201 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface() 215 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface() [all...] |
| /freebsd-src/lib/libsys/ |
| H A D | _umtx_op.2 | 78 .It Sy Mutex 101 A thread owning the robust mutex terminated. 102 The mutex is in unlocked state. 104 The robust mutex is in a non-recoverable state. 114 Mutex implements 118 Mutex implements 122 Mutex is robust, as described in the 126 Robust mutex is in a transient non-consistent state. 135 Each type of mutex 145 is the ceiling value for the mutex, a [all...] |
| /freebsd-src/contrib/llvm-project/compiler-rt/lib/scudo/standalone/ |
| H A D | stats.h | 14 #include "mutex.h" 64 void link(LocalStats *S) EXCLUDES(Mutex) { in link() 65 ScopedLock L(Mutex); in link() 69 void unlink(LocalStats *S) EXCLUDES(Mutex) { in unlink() 70 ScopedLock L(Mutex); in unlink() 76 void get(uptr *S) const EXCLUDES(Mutex) { in get() 77 ScopedLock L(Mutex); in get() 89 void lock() ACQUIRE(Mutex) { Mutex.lock(); } in lock() 90 void unlock() RELEASE(Mutex) { Mutex.unlock(); } in unlock() 92 void disable() ACQUIRE(Mutex) { lock(); } in disable() [all …]
|