/illumos-gate/usr/src/cmd/ipf/lib/ |
H A D | mutex_emul.c | 5 void eMmutex_enter(mtx, file, line) in eMmutex_enter() argument 6 eMmutex_t *mtx; in eMmutex_enter() 10 if (mtx->eMm_magic != EMM_MAGIC) { 12 mtx->eMm_owner, mtx, mtx->eMm_magic); 15 if (mtx->eMm_held != 0) { 17 mtx->eMm_owner, mtx, mtx->eMm_held); 20 mtx->eMm_held++; 21 mtx->eMm_heldin = file; 22 mtx->eMm_heldat = line; 26 void eMmutex_exit(mtx) in eMmutex_exit() argument [all …]
|
/illumos-gate/usr/src/test/libc-tests/tests/ |
H A D | c11_threads.c | 63 mtx_t mtx; in cthr_test_mtx_init() local 65 VERIFY3S(mtx_init(&mtx, mtx_plain), ==, thrd_success); in cthr_test_mtx_init() 66 mtx_destroy(&mtx); in cthr_test_mtx_init() 67 VERIFY3S(mtx_init(&mtx, mtx_timed), ==, thrd_success); in cthr_test_mtx_init() 68 mtx_destroy(&mtx); in cthr_test_mtx_init() 69 VERIFY3S(mtx_init(&mtx, mtx_plain | mtx_recursive), ==, thrd_success); in cthr_test_mtx_init() 70 mtx_destroy(&mtx); in cthr_test_mtx_init() 71 VERIFY3S(mtx_init(&mtx, mtx_timed | mtx_recursive), ==, thrd_success); in cthr_test_mtx_init() 72 mtx_destroy(&mtx); in cthr_test_mtx_init() 74 VERIFY3S(mtx_init(&mtx, UINT32_MAX), ==, thrd_error); in cthr_test_mtx_init() [all …]
|
/illumos-gate/usr/src/uts/common/io/scsi/adapters/iscsi/ |
H A D | iscsi_thread.c | 53 mutex_init(&thread->mgnt.mtx, NULL, MUTEX_DRIVER, NULL); in iscsi_thread_create() 54 mutex_init(&thread->sign.mtx, NULL, MUTEX_DRIVER, NULL); in iscsi_thread_create() 76 mutex_enter(&thread->mgnt.mtx); in iscsi_thread_destroy() 84 mutex_enter(&thread->sign.mtx); in iscsi_thread_destroy() 89 mutex_exit(&thread->sign.mtx); in iscsi_thread_destroy() 104 mutex_exit(&thread->mgnt.mtx); in iscsi_thread_destroy() 107 mutex_destroy(&thread->sign.mtx); in iscsi_thread_destroy() 108 mutex_destroy(&thread->mgnt.mtx); in iscsi_thread_destroy() 126 mutex_enter(&thread->mgnt.mtx); in iscsi_thread_start() 132 mutex_enter(&thread->sign.mtx); in iscsi_thread_start() [all …]
|
/illumos-gate/usr/src/lib/libc/port/threads/ |
H A D | c11_thr.c | 90 cnd_timedwait(cnd_t *_RESTRICT_KYWD cnd, mtx_t *_RESTRICT_KYWD mtx, in cnd_timedwait() argument 95 ret = pthread_cond_timedwait(cnd, mtx, ts); in cnd_timedwait() 105 cnd_wait(cnd_t *cnd, mtx_t *mtx) in cnd_wait() argument 109 ret = pthread_cond_wait(cnd, mtx); in cnd_wait() 116 mtx_destroy(mtx_t *mtx) in mtx_destroy() argument 118 if (pthread_mutex_destroy(mtx) != 0) in mtx_destroy() 123 mtx_init(mtx_t *mtx, int type) in mtx_init() argument 144 if (mutex_init((mutex_t *)mtx, mtype, NULL) == 0) in mtx_init() 150 mtx_lock(mtx_t *mtx) in mtx_lock() argument 152 if (pthread_mutex_lock(mtx) == 0) in mtx_lock() [all …]
|
/illumos-gate/usr/src/cmd/bhyve/test/tests/mevent/ |
H A D | read_pause.c | 41 static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; variable 86 pthread_mutex_lock(&mtx); in munch() 89 pthread_mutex_unlock(&mtx); in munch() 97 pthread_mutex_lock(&mtx); in tick() 100 pthread_mutex_unlock(&mtx); in tick() 124 pthread_mutex_lock(&mtx); in main() 132 pthread_cond_wait(&cv, &mtx); in main() 133 pthread_mutex_unlock(&mtx); in main() 144 pthread_mutex_lock(&mtx); in main() 148 pthread_cond_wait(&cv, &mtx); in main() [all …]
|
H A D | read_disable.c | 56 static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; variable 76 pthread_mutex_lock(&mtx); in munch() 84 pthread_mutex_unlock(&mtx); in munch() 90 pthread_mutex_lock(&mtx); in tick() 98 pthread_mutex_unlock(&mtx); in tick() 127 pthread_mutex_lock(&mtx); in main() 137 pthread_cond_wait(&cv, &mtx); in main() 139 pthread_mutex_unlock(&mtx); in main() 148 pthread_mutex_lock(&mtx); in main() 158 pthread_cond_wait(&cv, &mtx); in main() [all …]
|
H A D | read_requeue.c | 41 static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; variable 65 pthread_mutex_lock(&mtx); in munch() 68 pthread_mutex_unlock(&mtx); in munch() 95 pthread_mutex_lock(&mtx); in main() 103 pthread_cond_wait(&cv, &mtx); in main() 104 pthread_mutex_unlock(&mtx); in main()
|
H A D | lists_delete.c | 49 static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; variable 87 pthread_mutex_lock(&mtx); in flush_cb() 89 pthread_mutex_unlock(&mtx); in flush_cb() 101 pthread_mutex_lock(&mtx); in flush_and_wait() 107 pthread_cond_wait(&cv, &mtx); in flush_and_wait() 108 pthread_mutex_unlock(&mtx); in flush_and_wait()
|
H A D | vnode_file.c | 34 static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; variable 52 pthread_mutex_lock(&mtx); in callback() 55 pthread_mutex_unlock(&mtx); in callback() 87 pthread_mutex_lock(&mtx); in test_fd() 96 pthread_cond_wait(&cv, &mtx); in test_fd() 97 pthread_mutex_unlock(&mtx); in test_fd()
|
H A D | vnode_zvol.c | 38 static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; variable 56 pthread_mutex_lock(&mtx); in callback() 59 pthread_mutex_unlock(&mtx); in callback() 233 pthread_mutex_unlock(&mtx); in main() 239 pthread_mutex_lock(&mtx); in main() 240 pthread_cond_wait(&cv, &mtx); in main() 241 pthread_mutex_unlock(&mtx); in main()
|
/illumos-gate/usr/src/cmd/bhyve/amd64/ |
H A D | ps2mouse.c | 97 pthread_mutex_t mtx; member 162 assert(pthread_mutex_isowned_np(&sc->mtx)); in movement_reset() 182 assert(pthread_mutex_isowned_np(&sc->mtx)); in movement_get() 230 assert(pthread_mutex_isowned_np(&sc->mtx)); in ps2mouse_reset() 248 pthread_mutex_lock(&sc->mtx); in ps2mouse_read() 250 pthread_mutex_unlock(&sc->mtx); in ps2mouse_read() 264 pthread_mutex_lock(&sc->mtx); in ps2mouse_toggle() 273 pthread_mutex_unlock(&sc->mtx); in ps2mouse_toggle() 279 pthread_mutex_lock(&sc->mtx); in ps2mouse_write() 366 pthread_mutex_unlock(&sc->mtx); in ps2mouse_write() [all …]
|
H A D | atkbdc.c | 122 pthread_mutex_t mtx; member 159 assert(pthread_mutex_isowned_np(&sc->mtx)); in atkbdc_kbd_queue_data() 214 assert(pthread_mutex_isowned_np(&sc->mtx)); in atkbdc_kbd_read() 254 assert(pthread_mutex_isowned_np(&sc->mtx)); in atkbdc_kbd_poll() 269 assert(pthread_mutex_isowned_np(&sc->mtx)); in atkbdc_dequeue_data() 315 pthread_mutex_lock(&sc->mtx); in atkbdc_data_handler() 328 pthread_mutex_unlock(&sc->mtx); in atkbdc_data_handler() 373 pthread_mutex_unlock(&sc->mtx); in atkbdc_data_handler() 383 pthread_mutex_unlock(&sc->mtx); in atkbdc_data_handler() 401 pthread_mutex_lock(&sc->mtx); in atkbdc_sts_ctl_handler() [all …]
|
H A D | ps2kbd.c | 81 pthread_mutex_t mtx; member 263 pthread_mutex_lock(&sc->mtx); in ps2kbd_read() 265 pthread_mutex_unlock(&sc->mtx); in ps2kbd_read() 273 pthread_mutex_lock(&sc->mtx); in ps2kbd_write() 340 pthread_mutex_unlock(&sc->mtx); in ps2kbd_write() 354 assert(pthread_mutex_isowned_np(&sc->mtx)); in ps2kbd_keysym_queue() 397 pthread_mutex_lock(&sc->mtx); in ps2kbd_event() 399 pthread_mutex_unlock(&sc->mtx); in ps2kbd_event() 404 pthread_mutex_unlock(&sc->mtx); in ps2kbd_event() 496 pthread_mutex_init(&sc->mtx, NULL); in ps2kbd_init()
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/sfio/ |
H A D | vthread.h | 168 #define vtmtxerror(mtx) ((mtx)->error) argument 205 #define vtmtxopen(mtx,flgs) ((Vtmutex_t*)0) argument 206 #define vtmtxclose(mtx) (-1) argument 207 #define vtmtxlock(mtx) (-1) argument 208 #define vtmtxtrylock(mtx) (-1) argument 209 #define vtmtxunlock(mtx) (-1) argument 210 #define vtmtxclrlock(mtx) (-1) argument 214 #define vtmtxerror(mtx) (0) argument
|
H A D | sfstack.c | 51 reg Void_t* mtx; local 93 mtx = f1->mutex; f1->mutex = f2->mutex; f2->mutex = mtx;
|
/illumos-gate/usr/src/lib/libcryptoutil/common/ |
H A D | random.c | 136 pkcs11_open_common(int *fd, pthread_mutex_t *mtx, const char *dev, int oflag) in pkcs11_open_common() argument 138 (void) pthread_mutex_lock(mtx); in pkcs11_open_common() 141 (void) pthread_mutex_unlock(mtx); in pkcs11_open_common() 178 pkcs11_close_common(int *fd, pthread_mutex_t *mtx) in pkcs11_close_common() argument 180 (void) pthread_mutex_lock(mtx); in pkcs11_close_common() 183 (void) pthread_mutex_unlock(mtx); in pkcs11_close_common() 214 pkcs11_read_common(int *fd, pthread_mutex_t *mtx, void *dbuf, size_t dlen) in pkcs11_read_common() argument 218 (void) pthread_mutex_lock(mtx); in pkcs11_read_common() 220 (void) pthread_mutex_unlock(mtx); in pkcs11_read_common() 241 pkcs11_write_common(int *fd, pthread_mutex_t *mtx, void *dbuf, size_t dlen) in pkcs11_write_common() argument [all …]
|
/illumos-gate/usr/src/lib/smbsrv/libsmbns/common/ |
H A D | smbns_netbios_cache.c | 103 (void) mutex_lock(&entry->mtx); in smb_netbios_cache_getfirst() 105 (void) mutex_unlock(&entry->mtx); in smb_netbios_cache_getfirst() 126 (void) mutex_lock(&entry->mtx); in smb_netbios_cache_getnext() 128 (void) mutex_unlock(&entry->mtx); in smb_netbios_cache_getnext() 165 (void) mutex_lock(&entry->mtx); in smb_netbios_cache_lookup() 167 (void) mutex_unlock(&entry->mtx); in smb_netbios_cache_lookup() 180 (void) mutex_unlock(&name->mtx); in smb_netbios_cache_unlock_entry() 209 (void) mutex_lock(&entry->mtx); in smb_netbios_cache_lookup_addr() 219 (void) mutex_unlock(&entry->mtx); in smb_netbios_cache_lookup_addr() 247 (void) mutex_lock(&entry->mtx); in smb_netbios_cache_insert() [all …]
|
/illumos-gate/usr/src/cmd/bhyve/common/ |
H A D | bhyvegc.c | 69 pthread_mutex_init(&gc_image->mtx, NULL); in bhyvegc_init() 79 pthread_mutex_lock(&gc->gc_image->mtx); in bhyvegc_set_fbaddr() 86 pthread_mutex_unlock(&gc->gc_image->mtx); in bhyvegc_set_fbaddr() 96 pthread_mutex_lock(&gc->gc_image->mtx); in bhyvegc_resize() 110 pthread_mutex_unlock(&gc->gc_image->mtx); in bhyvegc_resize()
|
H A D | usb_emul.h | 116 pthread_mutex_t mtx; member 137 pthread_mutex_init(&((x)->mtx), NULL); \ 147 pthread_mutex_lock(&((x)->mtx)); \ 151 pthread_mutex_unlock(&((x)->mtx)); \ 154 #define USB_DATA_XFER_LOCK_HELD(x) MUTEX_HELD(&((x)->mtx))
|
/illumos-gate/usr/src/uts/sun4v/io/n2rng/ |
H A D | n2rng_provider.c | 122 mutex_enter(&frsp->mtx); in fips_random() 133 mutex_exit(&frsp->mtx); in fips_random() 146 mutex_exit(&frsp->mtx); in fips_random() 181 mutex_init(&frsp->mtx, NULL, MUTEX_DRIVER, NULL); in n2rng_fips_random_init() 192 mutex_destroy(&frsp->mtx); in n2rng_fips_random_fini()
|
/illumos-gate/usr/src/uts/common/vm/ |
H A D | page_lock.c | 928 kmutex_t *mtx; in page_szc_lock() local 950 mtx = PAGE_SZC_MUTEX(rootpp); in page_szc_lock() 951 mutex_enter(mtx); in page_szc_lock() 962 return (mtx); in page_szc_lock() 972 mutex_exit(mtx); in page_szc_lock() 983 mutex_exit(mtx); in page_szc_lock() 985 mtx = PAGE_SZC_MUTEX(rootpp); in page_szc_lock() 986 mutex_enter(mtx); in page_szc_lock() 987 mutex_exit(mtx); in page_szc_lock() 996 kmutex_t *mtx = PAGE_SZC_MUTEX(rootpp); in page_szc_lock_assert() local [all …]
|
/illumos-gate/usr/src/compat/bhyve/sys/ |
H A D | systm.h | 24 struct mtx; 34 struct unrhdr *new_unrhdr(int low, int high, struct mtx *mutex);
|
/illumos-gate/usr/src/cmd/svr4pkg/pkgserv/ |
H A D | pkgserv.c | 166 static mutex_t mtx = DEFAULTMUTEX; variable 308 (void) mutex_lock(&mtx); in server_main() 388 (void) cond_wait(&cv, &mtx); in server_main() 522 (void) mutex_lock(&mtx); in pkg_door_srv() 532 (void) cond_wait(&cv, &mtx); in pkg_door_srv() 576 (void) mutex_unlock(&mtx); in pkg_door_srv() 582 (void) mutex_unlock(&mtx); in pkg_door_srv() 1199 (void) mutex_lock(&mtx); in thr_pkgfilter() 1201 (void) mutex_unlock(&mtx); in thr_pkgfilter() 1219 (void) mutex_lock(&mtx); in thr_pkgfilter() [all …]
|
/illumos-gate/usr/src/test/libc-tests/tests/clocklock/ |
H A D | clock_lock_mutex.c | 35 pthread_mutex_t *mtx; in clock_mutex_create() local 38 mtx = calloc(1, sizeof (pthread_mutex_t)); in clock_mutex_create() 39 if (mtx == NULL) { in clock_mutex_create() 55 if ((ret = pthread_mutex_init(mtx, &attr)) != 0) { in clock_mutex_create() 60 *argp = mtx; in clock_mutex_create()
|
/illumos-gate/usr/src/uts/common/io/fibre-channel/fca/emlxs/ |
H A D | emlxs_fcp.c | 142 mutex_enter(&sbp->mtx); in emlxs_handle_fcp_event() 157 mutex_exit(&sbp->mtx); in emlxs_handle_fcp_event() 705 mutex_exit(&sbp->mtx); in emlxs_handle_fcp_event() 2231 mutex_enter(&sbp->mtx); in emlxs_unregister_pkt() 2247 mutex_exit(&sbp->mtx); in emlxs_unregister_pkt() 2357 mutex_enter(&sbp->mtx); in emlxs_tx_channel_flush() 2366 mutex_enter(&fpkt->mtx); in emlxs_tx_channel_flush() 2369 mutex_exit(&fpkt->mtx); in emlxs_tx_channel_flush() 2372 mutex_exit(&sbp->mtx); in emlxs_tx_channel_flush() 2604 mutex_enter(&sbp->mtx); in emlxs_tx_node_flush() [all …]
|