Home
last modified time | relevance | path

Searched refs:lock (Results 1 – 25 of 713) sorted by relevance

12345678910>>...29

/titanic_41/usr/src/uts/common/sys/
H A Dflock_impl.h228 #define SET_LOCK_TO_FIRST_ACTIVE_VP(gp, lock, vp) \ argument
230 (lock) = (lock_descriptor_t *)vp->v_filocks; \
233 #define SET_LOCK_TO_FIRST_SLEEP_VP(gp, lock, vp) \ argument
235 for ((lock) = SLEEPING_HEAD((gp))->l_next; ((lock) != SLEEPING_HEAD((gp)) && \
236 (lock)->l_vnode != (vp)); (lock) = (lock)->l_next) \
238 (lock) = ((lock) == SLEEPING_HEAD((gp))) ? NULL : (lock); \
247 #define IS_INITIAL(lock) ((lock)->l_status == FLK_INITIAL_STATE) argument
248 #define IS_ACTIVE(lock) ((lock)->l_status == FLK_ACTIVE_STATE) argument
249 #define IS_SLEEPING(lock) ((lock)->l_status == FLK_SLEEPING_STATE) argument
250 #define IS_GRANTED(lock) ((lock)->l_status == FLK_GRANTED_STATE) argument
[all …]
/titanic_41/usr/src/uts/common/io/drm/
H A Ddrm_lock.c46 volatile unsigned int *lock = &lock_data->hw_lock->lock; in drm_lock_take() local
49 old = *lock; in drm_lock_take()
54 } while (!atomic_cmpset_int(lock, old, new)); in drm_lock_take()
81 volatile unsigned int *lock = &lock_data->hw_lock->lock; in drm_lock_transfer() local
83 dev->lock.filp = NULL; in drm_lock_transfer()
85 old = *lock; in drm_lock_transfer()
87 } while (!atomic_cmpset_int(lock, old, new)); in drm_lock_transfer()
93 drm_lock_free(drm_device_t *dev, volatile unsigned int *lock, in drm_lock_free() argument
98 mutex_enter(&(dev->lock.lock_mutex)); in drm_lock_free()
99 dev->lock.filp = NULL; in drm_lock_free()
[all …]
/titanic_41/usr/src/uts/common/fs/smbsrv/
H A Dsmb_lock.c61 smb_lock_t *lock; in smb_lock_get_lock_count() local
71 for (lock = smb_llist_head(llist); in smb_lock_get_lock_count()
72 lock != NULL; in smb_lock_get_lock_count()
73 lock = smb_llist_next(llist, lock)) { in smb_lock_get_lock_count()
74 if (lock->l_file == of) in smb_lock_get_lock_count()
97 smb_lock_t *lock = NULL; in smb_unlock_range() local
102 status = smb_lock_range_ulckrules(sr, node, start, length, &lock); in smb_unlock_range()
108 ASSERT(lock == NULL); in smb_unlock_range()
113 smb_llist_remove(&node->n_lock_list, lock); in smb_unlock_range()
114 smb_lock_posix_unlock(node, lock, sr->user_cr); in smb_unlock_range()
[all …]
/titanic_41/usr/src/uts/common/os/
H A Dflock.c163 static void flk_free_lock(lock_descriptor_t *lock);
723 flk_free_lock(lock_descriptor_t *lock) in flk_free_lock() argument
725 ASSERT(IS_DEAD(lock)); in flk_free_lock()
726 if (IS_REFERENCED(lock)) { in flk_free_lock()
727 lock->l_state |= DELETED_LOCK; in flk_free_lock()
731 kmem_free((void *)lock, sizeof (lock_descriptor_t)); in flk_free_lock()
735 flk_set_state(lock_descriptor_t *lock, int new_state) in flk_set_state() argument
750 if (IS_INTERRUPTED(lock)) { in flk_set_state()
757 if (IS_CANCELLED(lock)) { in flk_set_state()
763 CHECK_LOCK_TRANSITION(lock->l_status, new_state); in flk_set_state()
[all …]
/titanic_41/usr/src/cmd/vntsd/
H A Dvntsdvcc.c58 (void) mutex_lock(&clientp->lock); in vntsd_notify_client_cons_del()
61 (void) mutex_unlock(&clientp->lock); in vntsd_notify_client_cons_del()
70 (void) mutex_destroy(&consp->lock); in free_cons()
82 (void) mutex_destroy(&groupp->lock); in free_group()
107 (void) mutex_lock(&consp->lock); in cleanup_cons()
122 (void) cond_reltimedwait(&consp->cvp, &consp->lock, &to); in cleanup_cons()
126 (void) mutex_lock(&groupp->lock); in cleanup_cons()
129 (void) mutex_unlock(&groupp->lock); in cleanup_cons()
131 (void) mutex_unlock(&consp->lock); in cleanup_cons()
167 (void) mutex_lock(&vntsdp->lock); in vntsd_delete_cons()
[all …]
H A Dconsole.c113 (void) mutex_lock(&consp->lock); in create_write_thread()
122 (void) mutex_unlock(&consp->lock); in create_write_thread()
126 (void) mutex_unlock(&consp->lock); in create_write_thread()
156 (void) mutex_lock(&groupp->lock); in list_all_domains()
163 (void) mutex_unlock(&groupp->lock); in list_all_domains()
259 (void) mutex_lock(&groupp->lock); in select_cons()
261 (void) mutex_unlock(&groupp->lock); in select_cons()
265 (void) mutex_unlock(&groupp->lock); in select_cons()
318 (void) mutex_lock(&groupp->lock); in select_cons()
325 (void) mutex_unlock(&groupp->lock); in select_cons()
[all …]
/titanic_41/usr/src/lib/libcrypt/common/
H A Dcryptio.c60 static mutex_t lock = DEFAULTMUTEX; variable
70 (void) mutex_lock(&lock); in run_setkey()
72 (void) mutex_unlock(&lock); in run_setkey()
78 (void) mutex_unlock(&lock); in run_setkey()
82 (void) mutex_unlock(&lock); in run_setkey()
85 (void) mutex_unlock(&lock); in run_setkey()
127 (void) mutex_lock(&lock); in run_crypt()
135 (void) mutex_unlock(&lock); in run_crypt()
141 (void) mutex_unlock(&lock); in run_crypt()
147 (void) mutex_unlock(&lock); in run_crypt()
[all …]
/titanic_41/usr/src/lib/libnsl/common/
H A Ddaemon_utils.c65 struct flock lock; in _check_daemon_lock() local
73 lock.l_type = F_WRLCK; in _check_daemon_lock()
74 lock.l_whence = SEEK_SET; in _check_daemon_lock()
75 lock.l_start = (off_t)0; in _check_daemon_lock()
76 lock.l_len = (off_t)0; in _check_daemon_lock()
78 err = fcntl(fd, F_GETLK, &lock); in _check_daemon_lock()
84 return ((lock.l_type == F_UNLCK) ? 0 : 1); in _check_daemon_lock()
144 struct flock lock; in _enter_daemon_lock() local
152 lock.l_type = F_WRLCK; in _enter_daemon_lock()
153 lock.l_whence = SEEK_SET; in _enter_daemon_lock()
[all …]
/titanic_41/usr/src/lib/libsqlite/test/
H A Dlock.test17 # $Id: lock.test,v 1.20 2004/02/14 16:31:04 drh Exp $
25 do_test lock-1.0 {
29 do_test lock-1.1 {
32 do_test lock-1.2 {
35 do_test lock-1.3 {
39 #do_test lock-1.4 {
44 do_test lock-1.5 {
50 do_test lock-1.6 {
54 do_test lock-1.7 {
57 do_test lock-1.8 {
[all …]
/titanic_41/usr/src/lib/krb5/plugins/kdb/db2/
H A Dadb_openclose.c241 db->lock = &lockp->lockinfo; in osa_adb_init_db()
242 db->lock->refcnt++; in osa_adb_init_db()
257 if (db->lock->refcnt == 0) { in osa_adb_fini_db()
261 db->lock->refcnt--; in osa_adb_fini_db()
264 if (db->lock->refcnt == 0) { in osa_adb_fini_db()
272 if (db->lock->lockmode != KRB5_DB_LOCKMODE_PERMANENT) in osa_adb_fini_db()
273 (void) fclose(db->lock->lockfile); in osa_adb_fini_db()
274 db->lock->lockfile = NULL; in osa_adb_fini_db()
275 krb5_free_context(db->lock->context); in osa_adb_fini_db()
288 if (db->lock->lockmode >= mode) { in osa_adb_get_lock()
[all …]
/titanic_41/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/
H A Drc_mem.c112 err = k5_mutex_lock(&id->lock); in krb5_rc_mem_get_span()
116 if (err = k5_mutex_lock(&grcache.lock)) { in krb5_rc_mem_get_span()
117 k5_mutex_unlock(&id->lock); in krb5_rc_mem_get_span()
122 k5_mutex_unlock(&grcache.lock); in krb5_rc_mem_get_span()
124 k5_mutex_unlock(&id->lock); in krb5_rc_mem_get_span()
144 retval = k5_mutex_lock(&id->lock); in krb5_rc_mem_init()
147 retval = k5_mutex_lock(&grcache.lock); in krb5_rc_mem_init()
149 k5_mutex_unlock(&id->lock); in krb5_rc_mem_init()
155 k5_mutex_unlock(&grcache.lock); in krb5_rc_mem_init()
156 k5_mutex_unlock(&id->lock); in krb5_rc_mem_init()
[all …]
/titanic_41/usr/src/common/atomic/amd64/
H A Datomic.s46 lock
54 lock
62 lock
70 lock
80 lock
91 lock
102 lock
113 lock
122 lock
130 lock
[all …]
/titanic_41/usr/src/uts/common/io/hxge/
H A Dhxge_common_impl.h119 #define MUTEX_INIT(lock, name, type, arg) \ argument
120 mutex_init(lock, name, type, arg)
121 #define MUTEX_ENTER(lock) mutex_enter(lock) argument
122 #define MUTEX_TRY_ENTER(lock) mutex_tryenter(lock) argument
123 #define MUTEX_EXIT(lock) mutex_exit(lock) argument
124 #define MUTEX_DESTROY(lock) mutex_destroy(lock) argument
126 #define RW_INIT(lock, name, type, arg) rw_init(lock, name, type, arg) argument
127 #define RW_ENTER_WRITER(lock) rw_enter(lock, RW_WRITER) argument
128 #define RW_ENTER_READER(lock) rw_enter(lock, RW_READER) argument
129 #define RW_TRY_ENTER(lock, type) rw_tryenter(lock, type) argument
[all …]
/titanic_41/usr/src/uts/common/io/fibre-channel/fca/emlxs/
H A Demlxs_thread.c46 mutex_enter(&tthread->lock); in emlxs_taskq_thread()
57 cv_wait(&tthread->cv_flag, &tthread->lock); in emlxs_taskq_thread()
65 mutex_exit(&tthread->lock); in emlxs_taskq_thread()
69 mutex_enter(&tthread->lock); in emlxs_taskq_thread()
75 mutex_exit(&tthread->lock); in emlxs_taskq_thread()
127 mutex_enter(&tthread->lock); in emlxs_taskq_dispatch()
131 mutex_exit(&tthread->lock); in emlxs_taskq_dispatch()
171 mutex_init(&tthread->lock, NULL, MUTEX_DRIVER, in emlxs_taskq_create()
229 mutex_enter(&tthread->lock); in emlxs_taskq_destroy()
235 mutex_exit(&tthread->lock); in emlxs_taskq_destroy()
[all …]
/titanic_41/usr/src/uts/common/fs/smbclnt/smbfs/
H A Dsmbfs_rwlock.c62 mutex_enter(&l->lock); in smbfs_rw_enter_sig()
85 if (!cv_wait_sig(&l->cv, &l->lock)) { in smbfs_rw_enter_sig()
88 mutex_exit(&l->lock); in smbfs_rw_enter_sig()
94 cv_wait(&l->cv, &l->lock); in smbfs_rw_enter_sig()
120 if (!cv_wait_sig(&l->cv, &l->lock)) { in smbfs_rw_enter_sig()
125 mutex_exit(&l->lock); in smbfs_rw_enter_sig()
131 cv_wait(&l->cv, &l->lock); in smbfs_rw_enter_sig()
138 mutex_exit(&l->lock); in smbfs_rw_enter_sig()
151 mutex_enter(&l->lock); in smbfs_rw_tryenter()
167 mutex_exit(&l->lock); in smbfs_rw_tryenter()
[all …]
/titanic_41/usr/src/lib/libslp/clib/
H A Dslp_queue.c63 mutex_t *lock; member
77 mutex_t *lock; in slp_new_queue() local
84 if ((lock = calloc(1, sizeof (*lock))) == NULL) { in slp_new_queue()
106 q->lock = lock; in slp_new_queue()
127 (void) mutex_lock(q->lock); in slp_enqueue()
137 (void) mutex_unlock(q->lock); in slp_enqueue()
156 (void) mutex_lock(q->lock); in slp_enqueue_at_head()
162 (void) mutex_unlock(q->lock); in slp_enqueue_at_head()
201 (void) mutex_lock(q->lock); in slp_dequeue_timed()
210 err = cond_timedwait(q->wait, q->lock, to); in slp_dequeue_timed()
[all …]
/titanic_41/usr/src/uts/sun4v/io/
H A Dvcc.c349 ASSERT(mutex_owned(&vport->lock)); in i_vcc_wait_port_status()
383 rv = cv_wait_sig(cv, &vport->lock); in i_vcc_wait_port_status()
399 mutex_enter(&vport->lock); in i_vcc_set_port_status()
402 mutex_exit(&vport->lock); in i_vcc_set_port_status()
412 ASSERT(mutex_owned(&vport->lock)); in i_vcc_ldc_init()
474 ASSERT(mutex_owned(&vport->lock)); in i_vcc_ldc_fini()
494 mutex_exit(&vport->lock); in i_vcc_ldc_fini()
497 mutex_enter(&vport->lock); in i_vcc_ldc_fini()
700 mutex_enter(&vport->lock); in i_vcc_config_port()
708 mutex_exit(&vport->lock); in i_vcc_config_port()
[all …]
H A Dldc_shm.c204 mutex_enter(&ldcp->lock); in ldc_mem_alloc_handle()
211 mutex_exit(&ldcp->lock); in ldc_mem_alloc_handle()
219 mutex_init(&mhdl->lock, NULL, MUTEX_DRIVER, NULL); in ldc_mem_alloc_handle()
239 mutex_exit(&ldcp->lock); in ldc_mem_alloc_handle()
263 mutex_enter(&mhdl->lock); in ldc_mem_free_handle()
271 mutex_exit(&mhdl->lock); in ldc_mem_free_handle()
274 mutex_exit(&mhdl->lock); in ldc_mem_free_handle()
283 mutex_destroy(&mhdl->lock); in ldc_mem_free_handle()
294 mutex_destroy(&mhdl->lock); in ldc_mem_free_handle()
373 mutex_enter(&mhdl->lock); in i_ldc_mem_bind_handle()
[all …]
/titanic_41/usr/src/lib/udapl/udapl_tavor/common/
H A Ddapl_ia_util.c91 dapl_os_lock_init(&ia_ptr->header.lock); in dapl_ia_alloc()
465 dapl_os_lock(&hca_ptr->lock); in dapli_ia_release_hca()
484 dapl_os_unlock(&hca_ptr->lock); in dapli_ia_release_hca()
523 dapl_os_lock_destroy(&ia_ptr->header.lock); in dapls_ia_free()
549 dapl_os_lock(&ia_ptr->header.lock); in dapl_ia_link_ep()
553 dapl_os_unlock(&ia_ptr->header.lock); in dapl_ia_link_ep()
577 dapl_os_lock(&ia_ptr->header.lock); in dapl_ia_unlink_ep()
580 dapl_os_unlock(&ia_ptr->header.lock); in dapl_ia_unlink_ep()
604 dapl_os_lock(&ia_ptr->header.lock); in dapl_ia_link_lmr()
608 dapl_os_unlock(&ia_ptr->header.lock); in dapl_ia_link_lmr()
[all …]
/titanic_41/usr/src/uts/sun4u/excalibur/io/
H A Dxcalwd.c56 kmutex_t lock; member
263 mutex_init(&tsp->lock, NULL, MUTEX_DRIVER, NULL); in xcalwd_attach()
290 mutex_destroy(&tsp->lock); in xcalwd_detach()
318 mutex_enter(&tsp->lock); in xcalwd_timeout()
321 mutex_exit(&tsp->lock); in xcalwd_timeout()
324 mutex_exit(&tsp->lock); in xcalwd_timeout()
367 mutex_enter(&tsp->lock); in xcalwd_close()
370 mutex_exit(&tsp->lock); in xcalwd_close()
380 mutex_exit(&tsp->lock); in xcalwd_close()
425 mutex_enter(&tsp->lock); in xcalwd_ioctl()
[all …]
/titanic_41/usr/src/uts/common/vm/
H A Dseg_vn.h87 krwlock_t lock; /* protect segvn_data and vpage array */ member
136 #define SEGVN_LOCK_ENTER(as, lock, type) rw_enter((lock), (type)) argument
137 #define SEGVN_LOCK_EXIT(as, lock) rw_exit((lock)) argument
138 #define SEGVN_LOCK_DOWNGRADE(as, lock) rw_downgrade((lock)) argument
139 #define SEGVN_LOCK_TRYENTER(as, lock, type) rw_tryenter((lock), (type)) argument
144 #define SEGVN_LOCK_HELD(as, lock) RW_LOCK_HELD((lock)) argument
145 #define SEGVN_READ_HELD(as, lock) RW_READ_HELD((lock)) argument
146 #define SEGVN_WRITE_HELD(as, lock) RW_WRITE_HELD((lock)) argument
/titanic_41/usr/src/uts/common/syscall/
H A Dsem.c355 kmutex_t *lock; in semctl() local
378 if ((lock = ipc_lookup(sem_svc, semid, in semctl()
382 mutex_exit(lock); in semctl()
399 if ((lock = ipc_lookup(sem_svc, semid, (kipc_perm_t **)&sp)) == NULL) { in semctl()
410 mutex_exit(lock); in semctl()
414 mutex_exit(lock); in semctl()
421 mutex_exit(lock); in semctl()
431 mutex_exit(lock); in semctl()
441 mutex_exit(lock); in semctl()
445 mutex_exit(lock); in semctl()
[all …]
/titanic_41/usr/src/cmd/lvm/md_monitord/
H A Dmd_monitord.c123 struct flock lock; in check_daemon_lock() local
135 lock.l_type = F_WRLCK; in check_daemon_lock()
136 lock.l_whence = SEEK_SET; in check_daemon_lock()
137 lock.l_start = 0; in check_daemon_lock()
138 lock.l_len = 0; in check_daemon_lock()
140 if (fcntl(daemon_lock_fd, F_GETLK, &lock) == -1) { in check_daemon_lock()
146 return (lock.l_type == F_UNLCK ? 0 : lock.l_pid); in check_daemon_lock()
152 struct flock lock; in enter_daemon_lock() local
164 lock.l_type = F_WRLCK; in enter_daemon_lock()
165 lock.l_whence = SEEK_SET; in enter_daemon_lock()
[all …]
/titanic_41/usr/src/cmd/lvm/rpc.mdcommd/
H A Dmddoors.c57 struct flock lock; in enter_daemon_lock() local
65 lock.l_type = F_WRLCK; in enter_daemon_lock()
66 lock.l_whence = SEEK_SET; in enter_daemon_lock()
67 lock.l_start = 0; in enter_daemon_lock()
68 lock.l_len = 0; in enter_daemon_lock()
70 if (fcntl(daemon_lock_fd, F_SETLK, &lock) == -1) { in enter_daemon_lock()
74 if (fcntl(daemon_lock_fd, F_GETLK, &lock) == -1) { in enter_daemon_lock()
77 return (lock.l_pid); in enter_daemon_lock()
91 struct flock lock; in exit_daemon_lock() local
93 lock.l_type = F_UNLCK; in exit_daemon_lock()
[all …]
/titanic_41/usr/src/lib/libdevinfo/
H A Ddevinfo_dli.c94 flock_t lock; in di_dli_open() local
118 bzero(&lock, sizeof (lock)); in di_dli_open()
119 lock.l_type = l_type; in di_dli_open()
120 if (fcntl(fd, F_SETLKW, &lock) < 0) { in di_dli_open()
150 flock_t lock; in di_dli_close() local
154 bzero(&lock, sizeof (lock)); in di_dli_close()
155 lock.l_type = F_UNLCK; in di_dli_close()
156 (void) fcntl(fd, F_SETLK, &lock); in di_dli_close()

12345678910>>...29