Searched refs:mtx (Results 1 - 25 of 1318) sorted by relevance

1234567891011>>

/freebsd-11-stable/contrib/ipfilter/lib/
H A Dmutex_emul.c20 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-11-stable/sys/dev/usb/
H A Dusb_request.h33 struct mtx *mtx, uint16_t sel);
35 struct mtx *mtx, uint8_t port, uint16_t sel);
37 struct mtx *mtx, uint8_t *alt_iface_no,
39 usb_error_t usbd_req_get_config(struct usb_device *udev, struct mtx *mtx,
43 usb_error_t usbd_req_get_config_desc(struct usb_device *udev, struct mtx *mtx,
[all...]
H A Dusbdi_util.h62 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-11-stable/tools/regression/pthread/mutex_isowned_np/
H A Dmutex_isowned_np.c38 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-11-stable/lib/libstdthreads/
H A Dmtx.c38 mtx_destroy(mtx_t *mtx) argument
41 (void)pthread_mutex_destroy(mtx);
45 mtx_init(mtx_t *mtx, int type) argument
67 if (pthread_mutex_init(mtx, &attr) != 0)
73 mtx_lock(mtx_t *mtx) argument
76 if (pthread_mutex_lock(mtx) != 0)
82 mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts) argument
85 switch (pthread_mutex_timedlock(mtx, ts)) {
96 mtx_trylock(mtx_t *mtx) argument
99 switch (pthread_mutex_trylock(mtx)) {
110 mtx_unlock(mtx_t *mtx) argument
[all...]
H A Dcnd.c77 cnd_timedwait(cnd_t *restrict cond, mtx_t *restrict mtx, argument
81 switch (pthread_cond_timedwait(cond, mtx, ts)) {
92 cnd_wait(cnd_t *cond, mtx_t *mtx) argument
95 if (pthread_cond_wait(cond, mtx) != 0)
/freebsd-11-stable/sys/dev/firewire/
H A Dif_fwevar.h51 struct mtx mtx; member in struct:fwe_softc
53 #define FWE_LOCK(fwe) mtx_lock(&(fwe)->mtx)
54 #define FWE_UNLOCK(fwe) mtx_unlock(&(fwe)->mtx)
H A Dif_fwipvar.h61 struct mtx mtx; member in struct:fwip_softc
63 #define FWIP_LOCK(fwip) mtx_lock(&(fwip)->mtx)
64 #define FWIP_UNLOCK(fwip) mtx_unlock(&(fwip)->mtx)
/freebsd-11-stable/sys/cam/
H A Dcam_sim.c49 static struct mtx cam_sim_free_mtx;
67 struct mtx *mtx, int max_dev_transactions,
90 sim->mtx = mtx;
91 if (mtx == &Giant) {
104 struct mtx *mtx = sim->mtx; local
107 if (mtx) {
65 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
130 struct mtx *mtx = sim->mtx; local
152 struct mtx *mtx = sim->mtx; local
[all...]
/freebsd-11-stable/sys/sys/
H A D_unrhdr.h34 struct mtx;
46 struct mtx *mtx; member in struct:unrhdr
47 TAILQ_HEAD(unrfr,unr) ppfree; /* Items to be freed after mtx
H A D_mutex.h45 struct mtx { struct
51 * Members of struct mtx_padalign must mirror members of struct mtx.
52 * mtx_padalign mutexes can use the mtx(9) API transparently without
/freebsd-11-stable/tools/regression/pthread/unwind/
H A Dcond_wait_cancel.cpp11 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 Dcond_wait_cancel2.cpp16 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-11-stable/lib/libthr/thread/
H A Dthr_umtx.h43 int __thr_umutex_lock(struct umutex *mtx, uint32_t id) __hidden;
44 int __thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) __hidden;
45 int __thr_umutex_timedlock(struct umutex *mtx, uint32_t id,
47 int __thr_umutex_unlock(struct umutex *mtx) __hidden;
48 int __thr_umutex_trylock(struct umutex *mtx) __hidden;
49 int __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling,
52 void _thr_umutex_init(struct umutex *mtx) __hidden;
55 int _thr_umtx_wait(volatile long *mtx, long exp,
57 int _thr_umtx_wait_uint(volatile u_int *mtx, u_int exp,
59 int _thr_umtx_timedwait_uint(volatile u_int *mtx, u_in
80 _thr_umutex_trylock(struct umutex *mtx, uint32_t id) argument
97 _thr_umutex_trylock2(struct umutex *mtx, uint32_t id) argument
118 _thr_umutex_lock(struct umutex *mtx, uint32_t id) argument
127 _thr_umutex_lock_spin(struct umutex *mtx, uint32_t id) argument
136 _thr_umutex_timedlock(struct umutex *mtx, uint32_t id, const struct timespec *timeout) argument
146 _thr_umutex_unlock2(struct umutex *mtx, uint32_t id, int *defer) argument
178 _thr_umutex_unlock(struct umutex *mtx, uint32_t id) argument
[all...]
H A Dthr_umtx.c44 _thr_umutex_init(struct umutex *mtx) argument
48 *mtx = default_mtx;
60 __thr_umutex_lock(struct umutex *mtx, uint32_t id) argument
64 if ((mtx->m_flags & (UMUTEX_PRIO_PROTECT | UMUTEX_PRIO_INHERIT)) != 0)
65 return (_umtx_op_err(mtx, UMTX_OP_MUTEX_LOCK, 0, 0, 0));
68 owner = mtx->m_owner;
70 atomic_cmpset_acq_32(&mtx->m_owner, owner, id | owner))
73 atomic_cmpset_acq_32(&mtx->m_owner, owner,
80 _umtx_op_err(mtx, UMTX_OP_MUTEX_WAIT, 0, 0, 0);
87 __thr_umutex_lock_spin(struct umutex *mtx, uint32_ argument
120 __thr_umutex_timedlock(struct umutex *mtx, uint32_t id, const struct timespec *abstime) argument
171 __thr_umutex_unlock(struct umutex *mtx) argument
178 __thr_umutex_trylock(struct umutex *mtx) argument
185 __thr_umutex_set_ceiling(struct umutex *mtx, uint32_t ceiling, uint32_t *oldceiling) argument
193 _thr_umtx_wait(volatile long *mtx, long id, const struct timespec *timeout) argument
204 _thr_umtx_wait_uint(volatile u_int *mtx, u_int id, const struct timespec *timeout, int shared) argument
217 _thr_umtx_timedwait_uint(volatile u_int *mtx, u_int id, int clockid, const struct timespec *abstime, int shared) argument
240 _thr_umtx_wake(volatile void *mtx, int nr_wakeup, int shared) argument
[all...]
/freebsd-11-stable/contrib/netbsd-tests/lib/libpthread/dlopen/dso/
H A Dh_pthread_dlopen.c59 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-11-stable/contrib/netbsd-tests/rump/kernspace/
H A Dlockme.c52 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 Dalloc.c51 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 Dthread.c72 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-11-stable/contrib/jemalloc/include/jemalloc/internal/
H A Dmb.h105 malloc_mutex_t mtx; local
107 malloc_mutex_init(&mtx, "mb", WITNESS_RANK_OMIT);
108 malloc_mutex_lock(NULL, &mtx);
109 malloc_mutex_unlock(NULL, &mtx);
/freebsd-11-stable/contrib/netbsd-tests/lib/libpthread/dlopen/
H A Dt_dlopen.c77 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-11-stable/sys/dev/bhnd/cores/pcie2/
H A Dbhnd_pcie2_var.h81 struct mtx mtx; /**< state mutex used to protect member in struct:bhnd_pcie2_softc
91 mtx_init(&(sc)->mtx, device_get_nameunit((sc)->dev), \
93 #define BHND_PCIE2_LOCK(sc) mtx_lock(&(sc)->mtx)
94 #define BHND_PCIE2_UNLOCK(sc) mtx_unlock(&(sc)->mtx)
95 #define BHND_PCIE2_LOCK_ASSERT(sc, what) mtx_assert(&(sc)->mtx, what)
96 #define BHND_PCIE2_LOCK_DESTROY(sc) mtx_destroy(&(sc)->mtx)
/freebsd-11-stable/sys/fs/fuse/
H A Dfuse.h148 extern struct mtx fuse_mtx;
203 #define fuse_lck_mtx_lock(mtx) do { \
205 __STRING(mtx), __func__, __LINE__, curthread->td_proc->p_pid); \
206 mtx_lock(&(mtx)); \
208 __STRING(mtx), __func__, __LINE__, curthread->td_proc->p_pid); \
211 #define fuse_lck_mtx_unlock(mtx) do { \
213 __STRING(mtx), __func__, __LINE__, curthread->td_proc->p_pid); \
214 mtx_unlock(&(mtx)); \
216 __STRING(mtx), __func__, __LINE__, curthread->td_proc->p_pid); \
/freebsd-11-stable/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/
H A Dtst.mutex_owned.d41 this->owned = mutex_owned((struct mtx *)arg0);
42 this->owner = mutex_owner((struct mtx *)arg0);
/freebsd-11-stable/sys/dev/twa/
H A Dtw_osl_types.h60 typedef struct mtx TW_LOCK_HANDLE;

Completed in 148 milliseconds

1234567891011>>