Home
last modified time | relevance | path

Searched full:mutex (Results 1 – 25 of 2369) sorted by relevance

12345678910>>...95

/freebsd/share/man/man9/
H A Dmutex.928 .\" 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 Dmtx_pool.941 .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/contrib/jemalloc/include/jemalloc/internal/
H A Dmutex.h12 /* Can only acquire one mutex of a given witness rank at a time. */
27 * bouncing: the data is not touched by the mutex holder
29 * contenders. Having it before the mutex itself could
102 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT), 0}
106 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)}
112 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT), 0}
116 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)}
124 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT), 0}
128 WITNESS_INITIALIZER("mutex", WITNESS_RANK_OMIT)}
136 bool malloc_mutex_init(malloc_mutex_t *mutex, cons
152 malloc_mutex_lock_final(malloc_mutex_t * mutex) malloc_mutex_lock_final() argument
158 malloc_mutex_trylock_final(malloc_mutex_t * mutex) malloc_mutex_trylock_final() argument
163 mutex_owner_stats_update(tsdn_t * tsdn,malloc_mutex_t * mutex) mutex_owner_stats_update() argument
176 malloc_mutex_trylock(tsdn_t * tsdn,malloc_mutex_t * mutex) malloc_mutex_trylock() argument
215 malloc_mutex_lock(tsdn_t * tsdn,malloc_mutex_t * mutex) malloc_mutex_lock() argument
228 malloc_mutex_unlock(tsdn_t * tsdn,malloc_mutex_t * mutex) malloc_mutex_unlock() argument
237 malloc_mutex_assert_owner(tsdn_t * tsdn,malloc_mutex_t * mutex) malloc_mutex_assert_owner() argument
242 malloc_mutex_assert_not_owner(tsdn_t * tsdn,malloc_mutex_t * mutex) malloc_mutex_assert_not_owner() argument
249 malloc_mutex_prof_read(tsdn_t * tsdn,mutex_prof_data_t * data,malloc_mutex_t * mutex) malloc_mutex_prof_read() argument
266 malloc_mutex_prof_accum(tsdn_t * tsdn,mutex_prof_data_t * data,malloc_mutex_t * mutex) malloc_mutex_prof_accum() argument
[all...]
/freebsd/sys/contrib/dev/acpica/components/executer/
H A Dexmutex.c3 * 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.Prev)->Mutex.Next = ObjDesc->Mutex.Next; in AcpiExUnlinkMutex()
204 * Migrate the previous sync level associated with this mutex to in AcpiExUnlinkMutex()
205 * the previous mutex on the list so that it may be preserved. in AcpiExUnlinkMutex()
[all …]
/freebsd/sys/contrib/device-tree/Bindings/soc/mediatek/
H A Dmediatek,mutex.yaml4 $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
30 - mediatek,mt8167-disp-mutex
31 - mediatek,mt8173-disp-mutex
[all …]
/freebsd/contrib/jemalloc/src/
H A Dmutex.c47 JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, in _pthread_mutex_init_calloc_cb() argument
53 _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, in _pthread_mutex_init_calloc_cb()
58 __libc_interposing[INTERPOS__pthread_mutex_init_calloc_cb])(mutex, in malloc_mutex_lock_slow() argument
65 malloc_mutex_lock_slow(malloc_mutex_t *mutex) { in malloc_mutex_lock_slow()
66 mutex_prof_data_t *data = &mutex->prof_data; in malloc_mutex_lock_slow()
76 if (!atomic_load_b(&mutex->locked, ATOMIC_RELAXED) in malloc_mutex_lock_slow()
77 && !malloc_mutex_trylock_final(mutex)) { in malloc_mutex_lock_slow()
85 malloc_mutex_lock_final(mutex); in malloc_mutex_lock_slow()
96 if (!malloc_mutex_trylock_final(mutex)) { in malloc_mutex_lock_slow()
103 malloc_mutex_lock_final(mutex); in malloc_mutex_lock_slow()
124 malloc_mutex_prof_data_reset(tsdn_t * tsdn,malloc_mutex_t * mutex) malloc_mutex_prof_data_reset() argument
156 malloc_mutex_init(malloc_mutex_t * mutex,const char * name,witness_rank_t rank,malloc_mutex_lock_order_t lock_order) malloc_mutex_init() argument
206 malloc_mutex_prefork(tsdn_t * tsdn,malloc_mutex_t * mutex) malloc_mutex_prefork() argument
211 malloc_mutex_postfork_parent(tsdn_t * tsdn,malloc_mutex_t * mutex) malloc_mutex_postfork_parent() argument
216 malloc_mutex_postfork_child(tsdn_t * tsdn,malloc_mutex_t * mutex) malloc_mutex_postfork_child() argument
[all...]
/freebsd/contrib/netbsd-tests/lib/libpthread/
H A Dt_mutex.c52 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 Dt_cond.c45 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/sys/contrib/device-tree/Bindings/display/mediatek/
H A Dmediatek,mutex.yaml4 $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/share/man/man3/
H A Dpthread.358 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 Dpthread_mutexattr.348 .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 owned by this thread.
[all …]
H A Dpthread_mutex_consistent.333 .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 as consistent again.
54 The consequent unlock of the mutex, by either
[all …]
H A Dpthread_mutex_timedlock.330 .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 Dpthread_mutex_lock.333 .Nd lock a mutex
39 .Fn pthread_mutex_lock "pthread_mutex_t *mutex"
44 .Fa mutex .
45 If the mutex is already locked, the calling thread will block until the
46 mutex becomes available.
59 .Fa mutex
63 .Fa mutex .
66 .Fa mutex
67 points to a robust mutex and the process containing the previous owning
68 thread terminated while holding the mutex lock.
[all …]
/freebsd/lib/libthr/thread/
H A Dthr_mutex.c65 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 %p own %#x is on robust linkage %p %p head %p phead %p", in mutex_assert_not_owned()
[all …]
/freebsd/crypto/openssl/crypto/thread/arch/
H A Dthread_posix.c98 pthread_mutex_t *mutex; in ossl_crypto_mutex_new() local
100 if ((mutex = OPENSSL_zalloc(sizeof(*mutex))) == NULL) in ossl_crypto_mutex_new()
102 if (pthread_mutex_init(mutex, NULL) != 0) { in ossl_crypto_mutex_new()
103 OPENSSL_free(mutex); in ossl_crypto_mutex_new()
106 return (CRYPTO_MUTEX *)mutex; in ossl_crypto_mutex_new()
109 int ossl_crypto_mutex_try_lock(CRYPTO_MUTEX *mutex) in ossl_crypto_mutex_try_lock() argument
113 mutex_p = (pthread_mutex_t *)mutex; in ossl_crypto_mutex_try_lock()
121 void ossl_crypto_mutex_lock(CRYPTO_MUTEX *mutex) in ossl_crypto_mutex_lock() argument
126 mutex_p = (pthread_mutex_t *)mutex; in ossl_crypto_mutex_lock()
131 void ossl_crypto_mutex_unlock(CRYPTO_MUTEX *mutex) in ossl_crypto_mutex_unlock() argument
[all …]
/freebsd/contrib/openbsm/libbsm/
H A Dbsm_control.c61 * 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/contrib/llvm-project/compiler-rt/lib/rtsan/tests/
H A Drtsan_test_functional.cpp26 #include <mutex>
82 std::mutex mutex; in TEST() local
83 auto Func = [&]() { mutex.lock(); }; in TEST()
89 std::mutex mutex; in TEST() local
90 mutex.lock(); in TEST()
91 auto Func = [&]() { mutex.unlock(); }; in TEST()
99 std::shared_mutex mutex; in TEST() local
100 auto Func = [&]() { mutex.lock(); }; in TEST()
106 std::shared_mutex mutex; in TEST() local
107 mutex.lock(); in TEST()
[all …]
/freebsd/contrib/llvm-project/compiler-rt/lib/gwp_asan/
H A Dmutex.h1 //===-- 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/lib/libsys/
H A D_umtx_op.278 .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, as specified by
[all …]
/freebsd/sys/contrib/dev/rtw88/
H A Dmac80211.c58 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()
178 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface()
207 mutex_unlock(&rtwdev->mutex); in rtw_ops_add_interface()
[all …]
/freebsd/sys/contrib/device-tree/Bindings/hwlock/
H A Dqcom-hwspinlock.yaml7 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/contrib/llvm-project/libcxx/src/
H A Dmutex_destructor.cpp9 // 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() noexcept;
39 mutex::~mutex() noexcept { __libcpp_mutex_destroy(&__m_); } in ~mutex()
/freebsd/contrib/llvm-project/compiler-rt/lib/scudo/standalone/
H A Dstats.h14 #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 …]
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_mutex.h83 // (should not be used as real Mutex type).
91 // The leaf mutexes can be locked under any other non-leaf mutex,
92 // but no other mutex can be locked while under a leaf mutex.
102 // `__sanitizer::Mutex` is used.
112 // then Bar mutex can be locked while under Foo mutex.
157 // Reader-writer mutex.
161 class SANITIZER_MUTEX Mutex : CheckedMutex {
163 explicit constexpr Mutex(MutexType type = MutexUnchecked)
174 // The mutex is not read-/write-locked, try to lock. in Lock()
193 return; // We've locked the mutex. in Lock()
[all …]

12345678910>>...95