Searched refs:lock (Results 26 - 50 of 1904) sorted by relevance

1234567891011>>

/freebsd-9.3-release/sys/sys/
H A Dcondvar.h55 void _cv_wait(struct cv *cvp, struct lock_object *lock);
56 void _cv_wait_unlock(struct cv *cvp, struct lock_object *lock);
57 int _cv_wait_sig(struct cv *cvp, struct lock_object *lock);
58 int _cv_timedwait(struct cv *cvp, struct lock_object *lock, int timo);
59 int _cv_timedwait_sig(struct cv *cvp, struct lock_object *lock, int timo);
64 #define cv_wait(cvp, lock) \
65 _cv_wait((cvp), &(lock)->lock_object)
66 #define cv_wait_unlock(cvp, lock) \
67 _cv_wait_unlock((cvp), &(lock)->lock_object)
68 #define cv_wait_sig(cvp, lock) \
[all...]
H A Dlock.h42 * Lock classes. Each lock has a class which describes characteristics
46 * an error to perform any type of context switch while holding a spin lock.
47 * Also, for an individual lock to be recursable, its class must allow
48 * recursion and the lock itself must explicitly allow recursion.
51 * data for the 'show lock' DDB command. The 'lc_lock' and
53 * to lock and unlock locks while blocking on a sleep queue. The
61 void (*lc_assert)(struct lock_object *lock, int what);
62 void (*lc_ddb_show)(struct lock_object *lock);
63 void (*lc_lock)(struct lock_object *lock, int how);
64 int (*lc_owner)(struct lock_object *lock, struc
[all...]
H A Drangelock.h42 * The structure representing the range lock. Caller may request
44 * all existing lock owners are compatible with the request. Two lock
51 * rl_waiters is the queue of lock requests in the order of arrival.
52 * rl_currdep is the first lock request that cannot be granted now due
64 void rangelock_init(struct rangelock *lock);
65 void rangelock_destroy(struct rangelock *lock);
66 void rangelock_unlock(struct rangelock *lock, void *cookie,
68 void *rangelock_unlock_range(struct rangelock *lock, void *cookie,
70 void *rangelock_rlock(struct rangelock *lock, off_
[all...]
/freebsd-9.3-release/contrib/gcclibs/libgomp/
H A Dfortran.c66 omp_init_lock_ (omp_lock_arg_t lock)
69 omp_lock_arg (lock) = malloc (sizeof (omp_lock_t));
71 omp_init_lock (omp_lock_arg (lock));
75 omp_init_nest_lock_ (omp_nest_lock_arg_t lock) argument
78 omp_nest_lock_arg (lock) = malloc (sizeof (omp_nest_lock_t));
80 omp_init_nest_lock (omp_nest_lock_arg (lock));
84 omp_destroy_lock_ (omp_lock_arg_t lock) argument
86 omp_destroy_lock (omp_lock_arg (lock));
88 free (omp_lock_arg (lock));
89 omp_lock_arg (lock)
94 omp_destroy_nest_lock_(omp_nest_lock_arg_t lock) argument
104 omp_set_lock_(omp_lock_arg_t lock) argument
110 omp_set_nest_lock_(omp_nest_lock_arg_t lock) argument
116 omp_unset_lock_(omp_lock_arg_t lock) argument
122 omp_unset_nest_lock_(omp_nest_lock_arg_t lock) argument
182 omp_test_lock_(omp_lock_arg_t lock) argument
212 omp_test_nest_lock_(omp_nest_lock_arg_t lock) argument
[all...]
/freebsd-9.3-release/sys/dev/drm/
H A Dvia_video.c43 XVMCLOCKPTR(dev_priv->sarea_priv, i)->lock = 0;
54 volatile int *lock; local
60 lock = (volatile int *)XVMCLOCKPTR(dev_priv->sarea_priv, i);
61 if ((_DRM_LOCKING_CONTEXT(*lock) == context)) {
62 if (_DRM_LOCK_IS_HELD(*lock)
63 && (*lock & _DRM_LOCK_CONT)) {
66 *lock = 0;
74 volatile int *lock; local
81 if (fx->lock >= VIA_NR_XVMC_LOCKS)
84 lock
[all...]
/freebsd-9.3-release/lib/libthr/thread/
H A Dthr_pspinlock.c46 _pthread_spin_init(pthread_spinlock_t *lock, int pshared) argument
51 if (lock == NULL || pshared != PTHREAD_PROCESS_PRIVATE)
57 *lock = lck;
65 _pthread_spin_destroy(pthread_spinlock_t *lock) argument
69 if (lock == NULL || *lock == NULL)
72 free(*lock);
73 *lock = NULL;
81 _pthread_spin_trylock(pthread_spinlock_t *lock) argument
87 if (lock
95 _pthread_spin_lock(pthread_spinlock_t *lock) argument
126 _pthread_spin_unlock(pthread_spinlock_t *lock) argument
[all...]
/freebsd-9.3-release/contrib/gcclibs/libgomp/config/posix95/
H A Domp-lock.h14 pthread_mutex_t lock; member in struct:__anon1291
/freebsd-9.3-release/sys/kern/
H A Dkern_condvar.c34 #include <sys/lock.h>
52 #define CV_ASSERT(cvp, lock, td) do { \
56 KASSERT((lock) != NULL, ("%s: lock NULL", __func__)); \
95 _cv_wait(struct cv *cvp, struct lock_object *lock) argument
108 CV_ASSERT(cvp, lock, td);
109 WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, lock,
111 class = LOCK_CLASS(lock);
126 if (lock == &Giant.lock_object)
130 sleepq_add(cvp, lock, cv
157 _cv_wait_unlock(struct cv *cvp, struct lock_object *lock) argument
212 _cv_wait_sig(struct cv *cvp, struct lock_object *lock) argument
278 _cv_timedwait(struct cv *cvp, struct lock_object *lock, int timo) argument
345 _cv_timedwait_sig(struct cv *cvp, struct lock_object *lock, int timo) argument
[all...]
H A Dkern_rangelock.c32 #include <sys/lock.h>
72 rangelock_init(struct rangelock *lock) argument
75 TAILQ_INIT(&lock->rl_waiters);
76 lock->rl_currdep = NULL;
80 rangelock_destroy(struct rangelock *lock) argument
83 KASSERT(TAILQ_EMPTY(&lock->rl_waiters), ("Dangling waiters"));
107 * Recalculate the lock->rl_currdep after an unlock.
110 rangelock_calc_block(struct rangelock *lock) argument
114 if (lock->rl_currdep == TAILQ_FIRST(&lock
139 rangelock_unlock_locked(struct rangelock *lock, struct rl_q_entry *entry, struct mtx *ilk) argument
157 rangelock_unlock(struct rangelock *lock, void *cookie, struct mtx *ilk) argument
170 rangelock_unlock_range(struct rangelock *lock, void *cookie, off_t start, off_t end, struct mtx *ilk) argument
198 rangelock_enqueue(struct rangelock *lock, off_t start, off_t end, int mode, struct mtx *ilk) argument
235 rangelock_rlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) argument
242 rangelock_wlock(struct rangelock *lock, off_t start, off_t end, struct mtx *ilk) argument
[all...]
/freebsd-9.3-release/contrib/openbsm/bin/auditdistd/
H A Dsynch.h51 mtx_init(pthread_mutex_t *lock) argument
55 error = pthread_mutex_init(lock, NULL);
59 mtx_destroy(pthread_mutex_t *lock) argument
63 error = pthread_mutex_destroy(lock);
67 mtx_lock(pthread_mutex_t *lock) argument
71 error = pthread_mutex_lock(lock);
75 mtx_trylock(pthread_mutex_t *lock) argument
79 error = pthread_mutex_trylock(lock);
84 mtx_unlock(pthread_mutex_t *lock) argument
88 error = pthread_mutex_unlock(lock);
92 mtx_owned(pthread_mutex_t *lock) argument
99 rw_init(pthread_rwlock_t *lock) argument
107 rw_destroy(pthread_rwlock_t *lock) argument
115 rw_rlock(pthread_rwlock_t *lock) argument
123 rw_wlock(pthread_rwlock_t *lock) argument
131 rw_unlock(pthread_rwlock_t *lock) argument
157 cv_wait(pthread_cond_t *cv, pthread_mutex_t *lock) argument
165 cv_timedwait(pthread_cond_t *cv, pthread_mutex_t *lock, int timeout) argument
[all...]
/freebsd-9.3-release/lib/libkse/thread/
H A Dthr_pspinlock.c49 _pthread_spin_init(pthread_spinlock_t *lock, int pshared) argument
54 if (lock == NULL || pshared != PTHREAD_PROCESS_PRIVATE)
61 *lock = lck;
69 _pthread_spin_destroy(pthread_spinlock_t *lock) argument
73 if (lock == NULL || *lock == NULL)
75 else if ((*lock)->s_owner != NULL)
78 free(*lock);
79 *lock = NULL;
87 _pthread_spin_trylock(pthread_spinlock_t *lock) argument
112 _pthread_spin_lock(pthread_spinlock_t *lock) argument
146 _pthread_spin_unlock(pthread_spinlock_t *lock) argument
[all...]
/freebsd-9.3-release/contrib/ntp/sntp/libevent/
H A Devthread-internal.h50 /* Global function pointers to lock-related functions. NULL if locking isn't
62 * running a given event_base's loop. Requires lock. */
69 * thread. Requires lock. */
75 /** Allocate a new lock, and store it in lockvar, a void*. Sets lockvar to
81 /** Free a given lock, if it is present and locking is enabled. */
89 /** Acquire a lock. */
93 evthread_lock_fns_.lock(mode, lockvar); \
96 /** Release a lock */
113 /** Lock an event_base, if it is set up for locking. Acquires the lock
124 /** If lock debuggin
137 EVLOCK_TRY_LOCK_(void *lock) argument
251 EVLOCK_TRY_LOCK_(void *lock) argument
[all...]
H A Devthread_pthread.c48 pthread_mutex_t *lock = mm_malloc(sizeof(pthread_mutex_t)); local
49 if (!lock)
53 if (pthread_mutex_init(lock, attr)) {
54 mm_free(lock);
57 return lock;
63 pthread_mutex_t *lock = lock_; local
64 pthread_mutex_destroy(lock);
65 mm_free(lock);
71 pthread_mutex_t *lock = lock_; local
73 return pthread_mutex_trylock(lock);
81 pthread_mutex_t *lock = lock_; local
141 pthread_mutex_t *lock = lock_; local
[all...]
H A Devthread_win32.c53 CRITICAL_SECTION *lock = mm_malloc(sizeof(CRITICAL_SECTION)); local
54 if (!lock)
56 if (InitializeCriticalSectionAndSpinCount(lock, SPIN_COUNT) == 0) {
57 mm_free(lock);
60 return lock;
66 CRITICAL_SECTION *lock = lock_; local
67 DeleteCriticalSection(lock);
68 mm_free(lock);
74 CRITICAL_SECTION *lock = lock_; local
76 return ! TryEnterCriticalSection(lock);
86 CRITICAL_SECTION *lock = lock_; local
160 CRITICAL_SECTION *lock = lock_; local
183 CRITICAL_SECTION lock; member in struct:evthread_win32_cond
236 CRITICAL_SECTION *lock = lock_; local
[all...]
/freebsd-9.3-release/contrib/libstdc++/config/cpu/hppa/
H A Datomicity.h46 // linker, we explicitly instantiate the atomicity lock.
55 volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock; local
64 : "r" (&lock)
70 : : "r" (&lock), "r" (tmp) : "memory");
79 volatile int& lock = _Atomicity_lock<0>::_S_atomicity_lock; local
88 : "r" (&lock)
93 : : "r" (&lock), "r" (tmp) : "memory");
/freebsd-9.3-release/lib/libkse/sys/
H A Dlock.h34 struct lock;
42 typedef void lock_handler_t(struct lock *, struct lockuser *);
44 struct lock { struct
56 volatile int lr_locked; /* lock granted = 0, busy otherwise */
57 volatile int lr_active; /* non-zero if the lock is last lock for thread */
82 void _lock_acquire(struct lock *, struct lockuser *, int);
83 void _lock_destroy(struct lock *);
84 void _lock_grant(struct lock *, struct lockuser *);
85 int _lock_init(struct lock *, enu
[all...]
/freebsd-9.3-release/sys/dev/vkbd/
H A Dvkbd_var.h41 int lock; /* keyboard lock key state */ member in struct:vkbd_status
/freebsd-9.3-release/usr.bin/lock/
H A DMakefile4 PROG= lock
/freebsd-9.3-release/sys/fs/ntfs/
H A Dntfs_ihash.h31 extern struct lock ntfs_hashlock;
/freebsd-9.3-release/sys/ofed/include/linux/
H A Dmutex.h32 #include <sys/lock.h>
47 #define DEFINE_MUTEX(lock) \
48 mutex_t lock; \
49 SX_SYSINIT_FLAGS(lock, &(lock).sx, "lnxmtx", SX_NOWITNESS)
/freebsd-9.3-release/contrib/ntp/sntp/libevent/include/event2/
H A Dthread.h35 lock its data structures.
58 @name Flags passed to lock functions
62 /** A flag passed to a locking callback when the lock was allocated as a
63 * read-write lock, and we want to acquire or release the lock for writing. */
65 /** A flag passed to a locking callback when the lock was allocated as a
66 * read-write lock, and we want to acquire or release the lock for reading. */
69 * for the lock; if we can't get the lock immediatel
115 int (*lock)(unsigned mode, void *lock); member in struct:evthread_lock_callbacks
[all...]
/freebsd-9.3-release/contrib/bind9/lib/isc/
H A Dquota.c34 return (isc_mutex_init(&quota->lock));
43 DESTROYLOCK(&quota->lock);
48 LOCK(&quota->lock);
50 UNLOCK(&quota->lock);
55 LOCK(&quota->lock);
57 UNLOCK(&quota->lock);
63 LOCK(&quota->lock);
72 UNLOCK(&quota->lock);
78 LOCK(&quota->lock);
81 UNLOCK(&quota->lock);
[all...]
/freebsd-9.3-release/contrib/ntp/lib/isc/
H A Dquota.c34 return (isc_mutex_init(&quota->lock));
43 DESTROYLOCK(&quota->lock);
48 LOCK(&quota->lock);
50 UNLOCK(&quota->lock);
55 LOCK(&quota->lock);
57 UNLOCK(&quota->lock);
63 LOCK(&quota->lock);
72 UNLOCK(&quota->lock);
78 LOCK(&quota->lock);
81 UNLOCK(&quota->lock);
[all...]
/freebsd-9.3-release/libexec/rtld-elf/
H A Drtld_lock.c32 * We use the "simple, non-scalable reader-preference lock" from:
38 * In this algorithm the lock is a single word. Its low-order bit is
39 * set when a writer holds the lock. The remaining high-order bits
40 * contain a count of readers desiring the lock. The algorithm requires
54 #define WAFLAG 0x1 /* A writer holds the lock */
55 #define RC_INCR 0x2 /* Adjusts count of readers desiring lock */
58 volatile u_int lock; member in struct:Struct_Lock
74 * Arrange for the lock to occupy its own cache line. First, we
91 l->lock = 0;
96 def_lock_destroy(void *lock) argument
104 def_rlock_acquire(void *lock) argument
114 def_wlock_acquire(void *lock) argument
129 def_lock_release(void *lock) argument
186 rlock_acquire(rtld_lock_t lock, RtldLockState *lockstate) argument
202 wlock_acquire(rtld_lock_t lock, RtldLockState *lockstate) argument
218 lock_release(rtld_lock_t lock, RtldLockState *lockstate) argument
238 lock_upgrade(rtld_lock_t lock, RtldLockState *lockstate) argument
[all...]
/freebsd-9.3-release/sys/dev/drm2/ttm/
H A Dttm_bo_manager.c41 * Currently we use a spinlock for the lock, but a mutex *may* be
48 struct mtx lock; member in struct:ttm_range_manager
72 mtx_lock(&rman->lock);
77 mtx_unlock(&rman->lock);
84 mtx_unlock(&rman->lock);
98 mtx_lock(&rman->lock);
100 mtx_unlock(&rman->lock);
118 mtx_init(&rman->lock, "ttmrman", NULL, MTX_DEF);
128 mtx_lock(&rman->lock);
131 mtx_unlock(&rman->lock);
[all...]

Completed in 217 milliseconds

1234567891011>>