Home
last modified time | relevance | path

Searched refs:lock_object (Results 1 – 25 of 56) sorted by relevance

123

/freebsd/sys/kern/
H A Dkern_sx.c91 WITNESS_SAVE(&Giant.lock_object, Giant); \
104 WITNESS_RESTORE(&Giant.lock_object, Giant); \
114 static void assert_sx(const struct lock_object *lock, int what);
116 static void db_show_sx(const struct lock_object *lock);
118 static void lock_sx(struct lock_object *lock, uintptr_t how);
120 static int owner_sx(const struct lock_object *lock, struct thread **owner);
122 static uintptr_t unlock_sx(struct lock_object *lock);
175 assert_sx(const struct lock_object *lock, int what) in assert_sx()
182 lock_sx(struct lock_object *lock, uintptr_t how) in lock_sx()
194 unlock_sx(struct lock_object *lock) in unlock_sx()
[all …]
H A Dkern_mutex.c97 static void assert_mtx(const struct lock_object *lock, int what);
99 static void db_show_mtx(const struct lock_object *lock);
101 static void lock_mtx(struct lock_object *lock, uintptr_t how);
102 static void lock_spin(struct lock_object *lock, uintptr_t how);
103 static int trylock_mtx(struct lock_object *lock, uintptr_t how);
104 static int trylock_spin(struct lock_object *lock, uintptr_t how);
106 static int owner_mtx(const struct lock_object *lock,
109 static uintptr_t unlock_mtx(struct lock_object *lock);
110 static uintptr_t unlock_spin(struct lock_object *lock);
188 assert_mtx(const struct lock_object *lock, int what) in assert_mtx()
[all …]
H A Dkern_lock.c92 if (LOCK_LOG_TEST(&(lk)->lock_object, 0)) \
95 if (LOCK_LOG_TEST(&(lk)->lock_object, 0)) \
105 WITNESS_RESTORE(&Giant.lock_object, Giant); \
110 WITNESS_SAVE(&Giant.lock_object, Giant); \
146 static void assert_lockmgr(const struct lock_object *lock, int how);
148 static void db_show_lockmgr(const struct lock_object *lock);
150 static void lock_lockmgr(struct lock_object *lock, uintptr_t how);
152 static int owner_lockmgr(const struct lock_object *lock,
155 static uintptr_t unlock_lockmgr(struct lock_object *lock);
189 lockmgr_exit(u_int flags, struct lock_object *ilk) in lockmgr_exit()
[all …]
H A Dkern_rwlock.c71 static void db_show_rwlock(const struct lock_object *lock);
73 static void assert_rw(const struct lock_object *lock, int what);
74 static void lock_rw(struct lock_object *lock, uintptr_t how);
75 static int trylock_rw(struct lock_object *lock, uintptr_t how);
77 static int owner_rw(const struct lock_object *lock, struct thread **owner);
79 static uintptr_t unlock_rw(struct lock_object *lock);
163 assert_rw(const struct lock_object *lock, int what) in assert_rw()
170 lock_rw(struct lock_object *lock, uintptr_t how) in lock_rw()
182 trylock_rw(struct lock_object *lock, uintptr_t how) in trylock_rw()
194 unlock_rw(struct lock_object *lock) in unlock_rw()
[all …]
H A Dkern_rmlock.c76 static void assert_rm(const struct lock_object *lock, int what);
78 static void db_show_rm(const struct lock_object *lock);
80 static void lock_rm(struct lock_object *lock, uintptr_t how);
82 static int owner_rm(const struct lock_object *lock, struct thread **owner);
84 static uintptr_t unlock_rm(struct lock_object *lock);
115 assert_rm(const struct lock_object *lock, int what) in assert_rm()
122 lock_rm(struct lock_object *lock, uintptr_t how) in lock_rm()
137 unlock_rm(struct lock_object *lock) in unlock_rm()
180 owner_rm(const struct lock_object *lock, struct thread **owner) in owner_rm()
306 lock_init(&rm->lock_object, lc, name, NULL, liflags); in rm_init_flags()
[all …]
H A Dkern_condvar.c108 _cv_wait(struct cv *cvp, struct lock_object *lock) in _cv_wait()
140 if (lock == &Giant.lock_object) in _cv_wait()
145 if (lock != &Giant.lock_object) { in _cv_wait()
160 if (lock != &Giant.lock_object) { in _cv_wait()
171 _cv_wait_unlock(struct cv *cvp, struct lock_object *lock) in _cv_wait_unlock()
183 KASSERT(lock != &Giant.lock_object, in _cv_wait_unlock()
228 _cv_wait_sig(struct cv *cvp, struct lock_object *lock) in _cv_wait_sig()
261 if (lock == &Giant.lock_object) in _cv_wait_sig()
267 if (lock != &Giant.lock_object) { in _cv_wait_sig()
282 if (lock != &Giant.lock_object) { in _cv_wait_sig()
[all...]
H A Dkern_synch.c131 _sleep(const void *ident, struct lock_object *lock, int priority, in _sleep()
154 KASSERT(lock != NULL && lock != &Giant.lock_object, in _sleep()
183 if (lock == &Giant.lock_object) in _sleep()
186 if (lock != NULL && lock != &Giant.lock_object && in _sleep()
229 if (lock != NULL && lock != &Giant.lock_object && !(priority & PDROP)) { in _sleep()
259 WITNESS_SAVE(&mtx->lock_object, mtx); in msleep_spin_sbt()
265 sleepq_add(ident, &mtx->lock_object, wmesg, SLEEPQ_SLEEP, 0); in msleep_spin_sbt()
301 WITNESS_RESTORE(&mtx->lock_object, mtx); in msleep_spin_sbt()
394 _blockcount_sleep(blockcount_t *bc, struct lock_object *lock, const char *wmesg, in _blockcount_wakeup()
403 KASSERT(lock != &Giant.lock_object,
[all...]
H A Dsubr_witness.c195 struct lock_object *li_lock;
284 struct lock_object *wh_lock;
320 const struct lock_object *lock);
363 static void witness_setflag(struct lock_object *lock, int flag, int set);
796 struct lock_object *lock; in witness_startup()
881 witness_init(struct lock_object *lock, const char *type) in witness_init()
922 witness_destroy(struct lock_object *lock) in witness_destroy()
1081 witness_defineorder(struct lock_object *lock1, struct lock_object *lock2) in witness_defineorder()
1114 witness_checkorder(struct lock_object *lock, int flags, const char *file, in witness_checkorder()
1115 int line, struct lock_object *interlock) in witness_checkorder()
[all …]
H A Dsubr_turnstile.c127 struct lock_object *ts_lockobj; /* (c) Lock we reference. */
560 turnstile_chain_lock(struct lock_object *lock) in turnstile_chain_lock()
569 turnstile_trywait(struct lock_object *lock) in turnstile_trywait()
592 turnstile_lock(struct turnstile *ts, struct lock_object **lockp, in turnstile_lock()
596 struct lock_object *lock; in turnstile_lock()
614 turnstile_unlock(struct turnstile *ts, struct lock_object *lock) in turnstile_unlock()
636 struct lock_object *lock; in turnstile_cancel()
654 turnstile_lookup(struct lock_object *lock) in turnstile_lookup()
673 turnstile_chain_unlock(struct lock_object *lock) in turnstile_chain_unlock()
743 struct lock_object *lock; in turnstile_wait()
[all …]
H A Dsubr_lock.c78 lock_init(struct lock_object *lock, struct lock_class *class, const char *name, in lock_init()
103 lock_destroy(struct lock_object *lock) in lock_destroy()
178 struct lock_object *lock; in DB_SHOW_COMMAND()
183 lock = (struct lock_object *)addr; in DB_SHOW_COMMAND()
203 struct lock_object *lpo_obj;
516 lock_profile_lookup(struct lock_object *lo, int spin, const char *file, in lock_profile_lookup()
553 lock_profile_object_lookup(struct lock_object *lo, int spin, const char *file, in lock_profile_object_lookup()
582 lock_profile_obtain_lock_success(struct lock_object *lo, bool spin, in lock_profile_obtain_lock_success()
655 lock_profile_release_lock(struct lock_object *lo, bool spin) in lock_profile_release_lock()
/freebsd/sys/sys/
H A Dlock.h63 void (*lc_assert)(const struct lock_object *lock, int what);
64 void (*lc_ddb_show)(const struct lock_object *lock);
65 void (*lc_lock)(struct lock_object *lock, uintptr_t how);
66 int (*lc_owner)(const struct lock_object *lock,
68 uintptr_t (*lc_unlock)(struct lock_object *lock);
69 int (*lc_trylock)(struct lock_object *lock, uintptr_t how);
218 void lock_init(struct lock_object *, struct lock_class *,
220 void lock_destroy(struct lock_object *);
225 void witness_init(struct lock_object *, const char *);
226 void witness_destroy(struct lock_object *);
[all …]
H A Dcondvar.h46 struct lock_object;
51 void _cv_wait(struct cv *cvp, struct lock_object *lock);
52 void _cv_wait_unlock(struct cv *cvp, struct lock_object *lock);
53 int _cv_wait_sig(struct cv *cvp, struct lock_object *lock);
54 int _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock,
56 int _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock,
63 _cv_wait((cvp), &(lock)->lock_object)
65 _cv_wait_unlock((cvp), &(lock)->lock_object)
67 _cv_wait_sig((cvp), &(lock)->lock_object)
69 _cv_timedwait_sbt((cvp), &(lock)->lock_object, \
[all …]
H A Dturnstile.h73 struct lock_object;
88 void turnstile_chain_lock(struct lock_object *);
89 void turnstile_chain_unlock(struct lock_object *);
95 struct turnstile *turnstile_lookup(struct lock_object *);
97 struct turnstile *turnstile_trywait(struct lock_object *);
100 bool turnstile_lock(struct turnstile *, struct lock_object **,
102 void turnstile_unlock(struct turnstile *, struct lock_object *);
H A Dlockstat.h98 lock_profile_obtain_lock_success(&(lp)->lock_object, false, c, wt, f, l); \
103 lock_profile_obtain_lock_success(&(lp)->lock_object, true, c, wt, f, l); \
108 lock_profile_obtain_lock_success(&(lp)->lock_object, false, c, wt, f, l); \
113 lock_profile_release_lock(&(lp)->lock_object, false); \
118 lock_profile_release_lock(&(lp)->lock_object, true); \
123 lock_profile_release_lock(&(lp)->lock_object, false); \
129 struct lock_object;
130 uint64_t lockstat_nsecs(struct lock_object *);
141 lock_profile_obtain_lock_success(&(lp)->lock_object, false, c, wt, f, l)
144 lock_profile_obtain_lock_success(&(lp)->lock_object, true, c, wt, f, l)
[all …]
H A D_rwlock.h45 struct lock_object lock_object; member
59 struct lock_object lock_object; member
H A D_mutex.h48 struct lock_object lock_object; /* Common lock properties. */ member
62 struct lock_object lock_object; /* Common lock properties. */ member
H A Dblockcount.h40 struct lock_object;
42 int _blockcount_sleep(blockcount_t *bc, struct lock_object *, const char *wmesg,
78 _blockcount_wait(blockcount_t *bc, struct lock_object *lo, const char *wmesg, in _blockcount_wait()
88 _blockcount_sleep((bc), (struct lock_object *)(lo), (wmesg), (prio))
90 _blockcount_wait((bc), (struct lock_object *)(lo), (wmesg), (prio))
H A D_rmlock.h55 struct lock_object lock_object; member
59 struct lock_object _rm_wlock_object;
H A Dlock_profile.h47 void lock_profile_obtain_lock_success(struct lock_object *lo, bool spin,
49 void lock_profile_release_lock(struct lock_object *lo, bool spin);
53 lock_profile_obtain_lock_failed(struct lock_object *lo, bool spin, in lock_profile_obtain_lock_failed()
H A Dlockmgr.h64 #define lk_recurse lock_object.lo_data
70 int __lockmgr_args(struct lock *lk, u_int flags, struct lock_object *ilk,
73 struct lock_object *ilk, const char *file, int line);
105 return (__lockmgr_args(lk, flags, (ilk != NULL) ? &ilk->lock_object : in _lockmgr_args()
114 return (__lockmgr_args(lk, flags, (ilk != NULL) ? &ilk->lock_object : in _lockmgr_args_rw()
H A Dcallout.h86 void _callout_init_lock(struct callout *, struct lock_object *, int);
88 _callout_init_lock((c), &(mtx)->lock_object, (flags))
90 _callout_init_lock((c), &(rm)->lock_object, (flags))
92 _callout_init_lock((c), &(rw)->lock_object, (flags))
H A D_sx.h41 struct lock_object lock_object; member
H A D_lockmgr.h39 struct lock_object lock_object; member
/freebsd/sys/contrib/openzfs/include/os/freebsd/spl/sys/
H A Dspl_condvar.h37 struct lock_object;
56 void _cv_wait(struct cv *cvp, struct lock_object *lock);
57 void _cv_wait_unlock(struct cv *cvp, struct lock_object *lock);
58 int _cv_wait_sig(struct cv *cvp, struct lock_object *lock);
59 int _cv_timedwait_sbt(struct cv *cvp, struct lock_object *lock,
61 int _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock,
68 _cv_wait((cvp), &(lock)->lock_object)
70 _cv_wait_unlock((cvp), &(lock)->lock_object)
72 _cv_timedwait_sbt((cvp), &(lock)->lock_object, (sbt), (pr), (flags))
74 _cv_timedwait_sig_sbt((cvp), &(lock)->lock_object, (sbt), (pr), (flags))
/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dlockdep.h58 struct lock_object *__lock = (struct lock_object *)(m); \
63 struct lock_object *__lock = (struct lock_object *)(m); \
68 struct lock_object *__lock = (struct lock_object *)(m); \
90 struct lock_object *__lock; in lockdep_is_held()

123