/freebsd-current/sbin/ipf/libipf/ |
H A D | mutex_emul.c | 19 eMmutex_enter(eMmutex_t *mtx, char *file, int line) argument 23 mtx->eMm_owner); 24 if (mtx->eMm_magic != EMM_MAGIC) { 26 mtx->eMm_owner, mtx, mtx->eMm_magic); 29 if (mtx->eMm_held != 0) { 31 mtx->eMm_owner, mtx, mtx 41 eMmutex_exit(eMmutex_t *mtx, char *file, int line) argument 63 eMmutex_init(eMmutex_t *mtx, char *who, char *file, int line) argument 87 eMmutex_destroy(eMmutex_t *mtx, char *file, int line) argument [all...] |
/freebsd-current/sys/dev/usb/ |
H A D | usb_request.h | 34 struct mtx *mtx, uint16_t sel); 36 struct mtx *mtx, uint8_t port, uint16_t sel); 38 struct mtx *mtx, uint8_t *alt_iface_no, 40 usb_error_t usbd_req_get_config(struct usb_device *udev, struct mtx *mtx, 44 usb_error_t usbd_req_get_config_desc(struct usb_device *udev, struct mtx *mtx, [all...] |
H A D | usbdi_util.h | 62 usb_error_t usbd_req_get_report(struct usb_device *udev, struct mtx *mtx, 66 struct mtx *mtx, void *d, uint16_t size, 68 usb_error_t usbd_req_get_string_any(struct usb_device *udev, struct mtx *mtx, 70 usb_error_t usbd_req_get_string_desc(struct usb_device *udev, struct mtx *mtx, 73 usb_error_t usbd_req_set_config(struct usb_device *udev, struct mtx *mtx, [all...] |
/freebsd-current/tools/regression/pthread/mutex_isowned_np/ |
H A D | mutex_isowned_np.c | 36 pthread_mutex_t *mtx = arg; local 38 if (pthread_mutex_isowned_np(mtx) != 0) { 50 pthread_mutex_t mtx; local 52 pthread_mutex_init(&mtx, NULL); 53 if (pthread_mutex_isowned_np(&mtx) != 0) { 58 pthread_mutex_lock(&mtx); 59 if (pthread_mutex_isowned_np(&mtx) == 0) { 64 pthread_create(&thr, NULL, thread, &mtx); 66 pthread_mutex_unlock(&mtx); 67 if (pthread_mutex_isowned_np(&mtx) ! [all...] |
/freebsd-current/sys/dev/firewire/ |
H A D | if_fwevar.h | 52 struct mtx mtx; member in struct:fwe_softc 54 #define FWE_LOCK(fwe) mtx_lock(&(fwe)->mtx) 55 #define FWE_UNLOCK(fwe) mtx_unlock(&(fwe)->mtx)
|
H A D | if_fwipvar.h | 62 struct mtx mtx; member in struct:fwip_softc 64 #define FWIP_LOCK(fwip) mtx_lock(&(fwip)->mtx) 65 #define FWIP_UNLOCK(fwip) mtx_unlock(&(fwip)->mtx)
|
/freebsd-current/sys/cam/ |
H A D | cam_sim.c | 48 static struct mtx cam_sim_free_mtx; 74 * The @p mtx acts as a perimeter lock for the SIM. All calls into the SIM's 90 * @param mtx Mutex to lock while interacting with the SIM, or NULL 102 struct mtx *mtx, int max_dev_transactions, 123 sim->mtx = mtx; 143 struct mtx *mtx; local 146 if (sim->mtx 100 cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, const char *sim_name, void *softc, uint32_t unit, struct mtx *mtx, int max_dev_transactions, int max_tagged_dev_transactions, struct cam_devq *queue) argument 171 struct mtx *mtx; local 192 struct mtx *mtx; local [all...] |
/freebsd-current/sys/fs/fuse/ |
H A D | fuse.h | 76 extern struct mtx fuse_mtx; 88 #define fuse_lck_mtx_lock(mtx) mtx_lock(&(mtx)) 89 #define fuse_lck_mtx_unlock(mtx) mtx_unlock(&(mtx))
|
/freebsd-current/sys/dev/fdt/ |
H A D | simple_mfd.h | 37 struct mtx mtx; member in struct:simple_mfd_softc
|
/freebsd-current/sys/dev/syscon/ |
H A D | syscon_generic.h | 37 struct mtx mtx; member in struct:syscon_generic_softc
|
/freebsd-current/sys/sys/ |
H A D | _unrhdr.h | 34 struct mtx; 46 struct mtx *mtx; member in struct:unrhdr 47 TAILQ_HEAD(unrfr,unr) ppfree; /* Items to be freed after mtx
|
/freebsd-current/lib/libstdthreads/ |
H A D | mtx.c | 36 mtx_destroy(mtx_t *mtx) argument 39 (void)pthread_mutex_destroy(mtx); 43 mtx_init(mtx_t *mtx, int type) argument 65 pthread_mutex_init(mtx, &attr) != 0) 72 mtx_lock(mtx_t *mtx) argument 75 if (pthread_mutex_lock(mtx) != 0) 81 mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts) argument 84 switch (pthread_mutex_timedlock(mtx, ts)) { 95 mtx_trylock(mtx_t *mtx) argument 98 switch (pthread_mutex_trylock(mtx)) { 109 mtx_unlock(mtx_t *mtx) argument [all...] |
/freebsd-current/tools/regression/pthread/unwind/ |
H A D | cond_wait_cancel2.cpp | 15 static pthread_mutex_t mtx; variable 22 pthread_mutex_lock(&mtx); 23 pthread_cond_wait(&cv, &mtx); 24 pthread_mutex_unlock(&mtx); 47 pthread_mutex_init(&mtx, NULL);
|
H A D | cond_wait_cancel.cpp | 10 static pthread_mutex_t mtx; variable 18 pthread_mutex_lock(&mtx); 19 pthread_cond_wait(&cv, &mtx); 20 pthread_mutex_unlock(&mtx); 30 pthread_mutex_init(&mtx, NULL);
|
/freebsd-current/lib/libthr/thread/ |
H A D | thr_umtx.h | 42 int __thr_umutex_lock(struct umutex *mtx, uint32_t id) __hidden; 43 int __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) __hidden; 44 int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, 46 int __thr_umutex_unlock(struct umutex *mtx) __hidden; 47 int __thr_umutex_trylock(struct umutex *mtx) __hidden; 48 int __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling, 51 void _thr_umutex_init(struct umutex *mtx) __hidden; 54 int _thr_umtx_wait(volatile long *mtx, long exp, 56 int _thr_umtx_wait_uint(volatile u_int *mtx, u_int exp, 58 int _thr_umtx_timedwait_uint(volatile u_int *mtx, u_in 79 _thr_umutex_trylock(struct umutex *mtx, uint32_t id) argument 96 _thr_umutex_trylock2(struct umutex *mtx, uint32_t id) argument 117 _thr_umutex_lock(struct umutex *mtx, uint32_t id) argument 126 _thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) argument 135 _thr_umutex_timedlock(struct umutex *mtx, uint32_t id, const struct timespec *timeout) argument 145 _thr_umutex_unlock2(struct umutex *mtx, uint32_t id, int *defer) argument 177 _thr_umutex_unlock(struct umutex *mtx, uint32_t id) argument [all...] |
H A D | thr_umtx.c | 33 _thr_umutex_init(struct umutex *mtx) argument 37 *mtx = default_mtx; 49 __thr_umutex_lock(struct umutex *mtx, uint32_t id) argument 53 if ((mtx->m_flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) != 0) 54 return (_umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0, 0, 0)); 57 owner = mtx->m_owner; 59 atomic_cmpset_acq_32(&mtx->m_owner, owner, id | owner)) 62 atomic_cmpset_acq_32(&mtx->m_owner, owner, 69 _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0, 0, 0); 76 __thr_umutex_lock_spin(struct umutex *mtx, uint32_ argument 109 __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, const struct timespec *abstime) argument 160 __thr_umutex_unlock(struct umutex *mtx) argument 167 __thr_umutex_trylock(struct umutex *mtx) argument 174 __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling, uint32_t *oldceiling) argument 182 _thr_umtx_wait(volatile long *mtx, long id, const struct timespec *timeout) argument 193 _thr_umtx_wait_uint(volatile u_int *mtx, u_int id, const struct timespec *timeout, int shared) argument 206 _thr_umtx_timedwait_uint(volatile u_int *mtx, u_int id, int clockid, const struct timespec *abstime, int shared) argument 229 _thr_umtx_wake(volatile void *mtx, int nr_wakeup, int shared) argument [all...] |
/freebsd-current/contrib/netbsd-tests/lib/libpthread/dlopen/dso/ |
H A D | h_pthread_dlopen.c | 59 testf_dso_mutex_lock(pthread_mutex_t *mtx) argument 61 ATF_REQUIRE(mtx != NULL); 62 ATF_REQUIRE(pthread_mutex_lock(mtx) == 0); 68 testf_dso_mutex_unlock(pthread_mutex_t *mtx) argument 70 ATF_REQUIRE(mtx != NULL); 71 ATF_REQUIRE(pthread_mutex_unlock(mtx) == 0);
|
/freebsd-current/sys/contrib/openzfs/lib/libspl/ |
H A D | getexecname.c | 40 static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; local 45 (void) pthread_mutex_lock(&mtx); 57 (void) pthread_mutex_unlock(&mtx);
|
/freebsd-current/sys/dev/qat/qat_api/qat_utils/src/ |
H A D | QatUtilsSpinLock.c | 7 qatUtilsLockInit(struct mtx *pLock) 18 qatUtilsLock(struct mtx *pLock) 28 qatUtilsUnlock(struct mtx *pLock) 38 qatUtilsLockDestroy(struct mtx *pLock)
|
/freebsd-current/contrib/netbsd-tests/rump/kernspace/ |
H A D | lockme.c | 52 kmutex_t mtx; local 56 mutex_init(&mtx, MUTEX_DEFAULT, IPL_NONE); 60 mutex_enter(&mtx); 61 mutex_enter(&mtx); 76 mutex_init(&mtx, MUTEX_DEFAULT, IPL_NONE); 79 mutex_destroy(&mtx); 80 mutex_destroy(&mtx); 83 mutex_enter(&mtx); 84 mutex_destroy(&mtx);
|
H A D | alloc.c | 51 static kmutex_t mtx; variable 60 mutex_enter(&mtx); 65 cv_wait(&kcv, &mtx); 66 mutex_exit(&mtx); 85 mutex_init(&mtx, MUTEX_DEFAULT, IPL_NONE); 103 mutex_enter(&mtx); 105 cv_wait(&kcv, &mtx); 106 mutex_exit(&mtx); 112 mutex_enter(&mtx); 115 mutex_exit(&mtx); [all...] |
H A D | thread.c | 72 static kmutex_t mtx; variable 80 mutex_enter(&mtx); 83 mutex_exit(&mtx); 94 mutex_init(&mtx, MUTEX_DEFAULT, IPL_NONE); 101 mutex_enter(&mtx); 103 cv_wait(&cv, &mtx); 104 mutex_exit(&mtx);
|
/freebsd-current/contrib/netbsd-tests/lib/libpthread/dlopen/ |
H A D | t_dlopen.c | 77 pthread_mutex_t mtx; local 81 ATF_REQUIRE(pthread_mutex_init(&mtx, NULL) == 0); 82 ATF_REQUIRE(pthread_mutex_lock(&mtx) == 0); 92 ATF_REQUIRE(pthread_mutex_unlock(&mtx) == 0); 96 pthread_mutex_destroy(&mtx); 109 pthread_mutex_t mtx; local 113 ATF_REQUIRE(pthread_mutex_init(&mtx, NULL) == 0); 114 ATF_REQUIRE(pthread_mutex_lock(&mtx) == 0); 123 ATF_REQUIRE(testf_dso_mutex_unlock(&mtx) == 0xcafe); 127 pthread_mutex_destroy(&mtx); 141 pthread_mutex_t mtx; local [all...] |
/freebsd-current/contrib/processor-trace/include/windows/ |
H A D | threads.h | 143 static inline int mtx_init(mtx_t *mtx, int type) argument 145 if (!mtx || type != mtx_plain) 148 InitializeCriticalSection(&mtx->cs); 153 static inline void mtx_destroy(mtx_t *mtx) argument 155 if (mtx) 156 DeleteCriticalSection(&mtx->cs); 159 static inline int mtx_lock(mtx_t *mtx) argument 161 if (!mtx) 164 EnterCriticalSection(&mtx->cs); 169 static inline int mtx_unlock(mtx_t *mtx) argument 225 cnd_wait(cnd_t *cnd, mtx_t *mtx) argument [all...] |
/freebsd-current/sys/compat/linuxkpi/common/src/ |
H A D | linux_hrtimer.c | 58 mtx_lock(&hrtimer->mtx); 60 mtx_unlock(&hrtimer->mtx); 75 mtx_lock(&hrtimer->mtx); 77 mtx_unlock(&hrtimer->mtx); 103 mtx_init(&hrtimer->mtx, "hrtimer", NULL, 105 callout_init_mtx(&hrtimer->callout, &hrtimer->mtx, 0); 126 mtx_lock(&hrtimer->mtx); 130 mtx_unlock(&hrtimer->mtx); 137 mtx_lock(&hrtimer->mtx); 140 mtx_unlock(&hrtimer->mtx); [all...] |