/freebsd-12-stable/contrib/ipfilter/lib/ |
H A D | mutex_emul.c | 20 eMmutex_enter(mtx, file, line) 21 eMmutex_t *mtx; 27 mtx->eMm_owner); 28 if (mtx->eMm_magic != EMM_MAGIC) { 30 mtx->eMm_owner, mtx, mtx->eMm_magic); 33 if (mtx->eMm_held != 0) { 35 mtx->eMm_owner, mtx, mt [all...] |
/freebsd-12-stable/sys/dev/usb/ |
H A D | usb_request.h | 35 struct mtx *mtx, uint16_t sel); 37 struct mtx *mtx, uint8_t port, uint16_t sel); 39 struct mtx *mtx, uint8_t *alt_iface_no, 41 usb_error_t usbd_req_get_config(struct usb_device *udev, struct mtx *mtx, 45 usb_error_t usbd_req_get_config_desc(struct usb_device *udev, struct mtx *mtx, [all...] |
H A D | usbdi_util.h | 64 usb_error_t usbd_req_get_report(struct usb_device *udev, struct mtx *mtx, 68 struct mtx *mtx, void *d, uint16_t size, 70 usb_error_t usbd_req_get_string_any(struct usb_device *udev, struct mtx *mtx, 72 usb_error_t usbd_req_get_string_desc(struct usb_device *udev, struct mtx *mtx, 75 usb_error_t usbd_req_set_config(struct usb_device *udev, struct mtx *mtx, [all...] |
/freebsd-12-stable/tools/regression/pthread/mutex_isowned_np/ |
H A D | mutex_isowned_np.c | 38 pthread_mutex_t *mtx = arg; local 40 if (pthread_mutex_isowned_np(mtx) != 0) { 52 pthread_mutex_t mtx; local 54 pthread_mutex_init(&mtx, NULL); 55 if (pthread_mutex_isowned_np(&mtx) != 0) { 60 pthread_mutex_lock(&mtx); 61 if (pthread_mutex_isowned_np(&mtx) == 0) { 66 pthread_create(&thr, NULL, thread, &mtx); 68 pthread_mutex_unlock(&mtx); 69 if (pthread_mutex_isowned_np(&mtx) ! [all...] |
/freebsd-12-stable/lib/libstdthreads/ |
H A D | mtx.c | 40 mtx_destroy(mtx_t *mtx) argument 43 (void)pthread_mutex_destroy(mtx); 47 mtx_init(mtx_t *mtx, int type) argument 69 if (pthread_mutex_init(mtx, &attr) != 0) 75 mtx_lock(mtx_t *mtx) argument 78 if (pthread_mutex_lock(mtx) != 0) 84 mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts) argument 87 switch (pthread_mutex_timedlock(mtx, ts)) { 98 mtx_trylock(mtx_t *mtx) argument 101 switch (pthread_mutex_trylock(mtx)) { 112 mtx_unlock(mtx_t *mtx) argument [all...] |
/freebsd-12-stable/sys/cam/ |
H A D | cam_sim.c | 51 static struct mtx cam_sim_free_mtx; 69 struct mtx *mtx, int max_dev_transactions, 92 sim->mtx = mtx; 93 if (mtx == &Giant) { 106 struct mtx *mtx; local 109 if (sim->mtx == NULL) { 110 mtx 67 cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, const char *sim_name, void *softc, u_int32_t unit, struct mtx *mtx, int max_dev_transactions, int max_tagged_dev_transactions, struct cam_devq *queue) argument 133 struct mtx *mtx; local 154 struct mtx *mtx; local [all...] |
/freebsd-12-stable/sys/dev/firewire/ |
H A D | if_fwevar.h | 53 struct mtx mtx; member in struct:fwe_softc 55 #define FWE_LOCK(fwe) mtx_lock(&(fwe)->mtx) 56 #define FWE_UNLOCK(fwe) mtx_unlock(&(fwe)->mtx)
|
H A D | if_fwipvar.h | 63 struct mtx mtx; member in struct:fwip_softc 65 #define FWIP_LOCK(fwip) mtx_lock(&(fwip)->mtx) 66 #define FWIP_UNLOCK(fwip) mtx_unlock(&(fwip)->mtx)
|
/freebsd-12-stable/sys/fs/fuse/ |
H A D | fuse.h | 78 extern struct mtx fuse_mtx; 90 #define fuse_lck_mtx_lock(mtx) mtx_lock(&(mtx)) 91 #define fuse_lck_mtx_unlock(mtx) mtx_unlock(&(mtx))
|
/freebsd-12-stable/sys/dev/extres/syscon/ |
H A D | syscon_generic.h | 39 struct mtx mtx; member in struct:syscon_generic_softc
|
/freebsd-12-stable/sys/dev/fdt/ |
H A D | simple_mfd.h | 39 struct mtx mtx; member in struct:simple_mfd_softc
|
/freebsd-12-stable/sys/sys/ |
H A D | _unrhdr.h | 36 struct mtx; 48 struct mtx *mtx; member in struct:unrhdr 49 TAILQ_HEAD(unrfr,unr) ppfree; /* Items to be freed after mtx
|
/freebsd-12-stable/tools/regression/pthread/unwind/ |
H A D | cond_wait_cancel.cpp | 11 pthread_mutex_t mtx; variable 19 pthread_mutex_lock(&mtx); 20 pthread_cond_wait(&cv, &mtx); 21 pthread_mutex_unlock(&mtx); 31 pthread_mutex_init(&mtx, NULL);
|
H A D | cond_wait_cancel2.cpp | 16 pthread_mutex_t mtx; variable 23 pthread_mutex_lock(&mtx); 24 pthread_cond_wait(&cv, &mtx); 25 pthread_mutex_unlock(&mtx); 48 pthread_mutex_init(&mtx, NULL);
|
/freebsd-12-stable/lib/libthr/thread/ |
H A D | thr_umtx.h | 45 int __thr_umutex_lock(struct umutex *mtx, uint32_t id) __hidden; 46 int __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) __hidden; 47 int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, 49 int __thr_umutex_unlock(struct umutex *mtx) __hidden; 50 int __thr_umutex_trylock(struct umutex *mtx) __hidden; 51 int __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling, 54 void _thr_umutex_init(struct umutex *mtx) __hidden; 57 int _thr_umtx_wait(volatile long *mtx, long exp, 59 int _thr_umtx_wait_uint(volatile u_int *mtx, u_int exp, 61 int _thr_umtx_timedwait_uint(volatile u_int *mtx, u_in 82 _thr_umutex_trylock(struct umutex *mtx, uint32_t id) argument 99 _thr_umutex_trylock2(struct umutex *mtx, uint32_t id) argument 120 _thr_umutex_lock(struct umutex *mtx, uint32_t id) argument 129 _thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) argument 138 _thr_umutex_timedlock(struct umutex *mtx, uint32_t id, const struct timespec *timeout) argument 148 _thr_umutex_unlock2(struct umutex *mtx, uint32_t id, int *defer) argument 180 _thr_umutex_unlock(struct umutex *mtx, uint32_t id) argument [all...] |
H A D | thr_umtx.c | 46 _thr_umutex_init(struct umutex *mtx) argument 50 *mtx = default_mtx; 62 __thr_umutex_lock(struct umutex *mtx, uint32_t id) argument 66 if ((mtx->m_flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) != 0) 67 return (_umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0, 0, 0)); 70 owner = mtx->m_owner; 72 atomic_cmpset_acq_32(&mtx->m_owner, owner, id | owner)) 75 atomic_cmpset_acq_32(&mtx->m_owner, owner, 82 _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0, 0, 0); 89 __thr_umutex_lock_spin(struct umutex *mtx, uint32_ argument 122 __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, const struct timespec *abstime) argument 173 __thr_umutex_unlock(struct umutex *mtx) argument 180 __thr_umutex_trylock(struct umutex *mtx) argument 187 __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling, uint32_t *oldceiling) argument 195 _thr_umtx_wait(volatile long *mtx, long id, const struct timespec *timeout) argument 206 _thr_umtx_wait_uint(volatile u_int *mtx, u_int id, const struct timespec *timeout, int shared) argument 219 _thr_umtx_timedwait_uint(volatile u_int *mtx, u_int id, int clockid, const struct timespec *abstime, int shared) argument 242 _thr_umtx_wake(volatile void *mtx, int nr_wakeup, int shared) argument [all...] |
/freebsd-12-stable/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-12-stable/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-12-stable/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-12-stable/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-12-stable/sys/dev/bhnd/bhndb/ |
H A D | bhndb_pcivar.h | 119 struct mtx mtx; member in struct:bhndb_pci_softc 124 mtx_init(&(sc)->mtx, device_get_nameunit((sc)->dev), \ 126 #define BHNDB_PCI_LOCK(sc) mtx_lock(&(sc)->mtx) 127 #define BHNDB_PCI_UNLOCK(sc) mtx_unlock(&(sc)->mtx) 128 #define BHNDB_PCI_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->mtx, what) 129 #define BHNDB_PCI_LOCK_DESTROY(sc) mtx_destroy(&(sc)->mtx)
|
/freebsd-12-stable/sys/dev/bhnd/cores/chipc/ |
H A D | chipcvar.h | 163 struct mtx mtx; /**< state mutex. */ member in struct:chipc_softc 170 mtx_init(&(sc)->mtx, device_get_nameunit((sc)->dev), \ 172 #define CHIPC_LOCK(sc) mtx_lock(&(sc)->mtx) 173 #define CHIPC_UNLOCK(sc) mtx_unlock(&(sc)->mtx) 174 #define CHIPC_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->mtx, what) 175 #define CHIPC_LOCK_DESTROY(sc) mtx_destroy(&(sc)->mtx)
|
/freebsd-12-stable/sys/dev/bhnd/cores/pcie2/ |
H A D | bhnd_pcie2_var.h | 83 struct mtx mtx; /**< state mutex used to protect member in struct:bhnd_pcie2_softc 93 mtx_init(&(sc)->mtx, device_get_nameunit((sc)->dev), \ 95 #define BHND_PCIE2_LOCK(sc) mtx_lock(&(sc)->mtx) 96 #define BHND_PCIE2_UNLOCK(sc) mtx_unlock(&(sc)->mtx) 97 #define BHND_PCIE2_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->mtx, what) 98 #define BHND_PCIE2_LOCK_DESTROY(sc) mtx_destroy(&(sc)->mtx)
|