Searched refs:lock (Results 1 - 25 of 2780) sorted by relevance

1234567891011>>

/freebsd-11-stable/sys/contrib/octeon-sdk/
H A Dcvmx-rwlock.h67 /* Flags for lock value in rw lock structure */
73 * is waiting, no readers are given the lock until all writers are done.
77 volatile uint32_t lock; member in struct:__anon8744
83 * Initialize a reader/writer lock. This must be done
86 * @param lock pointer to rwlock structure
88 static inline void cvmx_rwlock_wp_init(cvmx_rwlock_wp_lock_t *lock) argument
90 lock->lock = 0;
91 lock
104 cvmx_rwlock_wp_read_lock(cvmx_rwlock_wp_lock_t *lock) argument
126 cvmx_rwlock_wp_read_unlock(cvmx_rwlock_wp_lock_t *lock) argument
141 cvmx_rwlock_wp_write_lock(cvmx_rwlock_wp_lock_t *lock) argument
158 cvmx_rwlock_wp_write_unlock(cvmx_rwlock_wp_lock_t *lock) argument
[all...]
H A Dcvmx-spinlock.h89 * @param lock Lock to initialize
91 static inline void cvmx_spinlock_init(cvmx_spinlock_t *lock) argument
93 lock->value = CVMX_SPINLOCK_UNLOCKED_VAL;
100 * @param lock Lock to check
103 static inline int cvmx_spinlock_locked(cvmx_spinlock_t *lock) argument
105 return (lock->value != CVMX_SPINLOCK_UNLOCKED_VAL);
110 * Releases lock
112 * @param lock pointer to lock structure
114 static inline void cvmx_spinlock_unlock(cvmx_spinlock_t *lock) argument
134 cvmx_spinlock_trylock(cvmx_spinlock_t *lock) argument
160 cvmx_spinlock_lock(cvmx_spinlock_t *lock) argument
286 cvmx_spinlock_rec_init(cvmx_spinlock_rec_t *lock) argument
298 cvmx_spinlock_rec_locked(cvmx_spinlock_rec_t *lock) argument
314 _int_cvmx_spinlock_rec_unlock(cvmx_spinlock_rec_t *lock, char *filename, int linenum) argument
383 _int_cvmx_spinlock_rec_lock(cvmx_spinlock_rec_t *lock, char *filename, int linenum) argument
[all...]
/freebsd-11-stable/contrib/gcclibs/libgomp/config/posix95/
H A Dlock.c38 omp_init_lock (omp_lock_t *lock) argument
40 pthread_mutex_init (lock, NULL);
44 omp_destroy_lock (omp_lock_t *lock) argument
46 pthread_mutex_destroy (lock);
50 omp_set_lock (omp_lock_t *lock) argument
52 pthread_mutex_lock (lock);
56 omp_unset_lock (omp_lock_t *lock) argument
58 pthread_mutex_unlock (lock);
62 omp_test_lock (omp_lock_t *lock) argument
64 return pthread_mutex_trylock (lock)
68 omp_init_nest_lock(omp_nest_lock_t *lock) argument
76 omp_destroy_nest_lock(omp_nest_lock_t *lock) argument
82 omp_set_nest_lock(omp_nest_lock_t *lock) argument
96 omp_unset_nest_lock(omp_nest_lock_t *lock) argument
108 omp_test_nest_lock(omp_nest_lock_t *lock) argument
[all...]
/freebsd-11-stable/lib/libc/iconv/
H A Dcitrus_lock.h30 #define WLOCK(lock) if (__isthreaded) \
31 pthread_rwlock_wrlock(lock);
32 #define UNLOCK(lock) if (__isthreaded) \
33 pthread_rwlock_unlock(lock);
/freebsd-11-stable/sys/dev/drm2/ttm/
H A Dttm_lock.c50 void ttm_lock_init(struct ttm_lock *lock) argument
52 mtx_init(&lock->lock, "ttmlk", NULL, MTX_DEF);
53 lock->rw = 0;
54 lock->flags = 0;
55 lock->kill_takers = false;
56 lock->signal = SIGKILL;
70 void ttm_read_unlock(struct ttm_lock *lock) argument
72 mtx_lock(&lock->lock);
78 __ttm_read_lock(struct ttm_lock *lock) argument
94 ttm_read_lock(struct ttm_lock *lock, bool interruptible) argument
118 __ttm_read_trylock(struct ttm_lock *lock, bool *locked) argument
139 ttm_read_trylock(struct ttm_lock *lock, bool interruptible) argument
167 ttm_write_unlock(struct ttm_lock *lock) argument
175 __ttm_write_lock(struct ttm_lock *lock) argument
194 ttm_write_lock(struct ttm_lock *lock, bool interruptible) argument
224 ttm_write_lock_downgrade(struct ttm_lock *lock) argument
232 __ttm_vt_unlock(struct ttm_lock *lock) argument
249 struct ttm_lock *lock = container_of(base, struct ttm_lock, base); local
257 __ttm_vt_lock(struct ttm_lock *lock) argument
271 ttm_vt_lock(struct ttm_lock *lock, bool interruptible, struct ttm_object_file *tfile) argument
314 ttm_vt_unlock(struct ttm_lock *lock) argument
320 ttm_suspend_unlock(struct ttm_lock *lock) argument
328 __ttm_suspend_lock(struct ttm_lock *lock) argument
342 ttm_suspend_lock(struct ttm_lock *lock) argument
[all...]
H A Dttm_lock.h34 * of the DRM heavyweight hardware lock.
35 * The lock is a read-write lock. Taking it in read mode and write mode
40 * It's allowed to leave kernel space with the vt lock held.
41 * If a user-space process dies while having the vt-lock,
42 * it will be released during the file descriptor release. The vt lock
43 * excludes write lock and read lock.
45 * The suspend mode is used to lock out all TTM users when preparing for
60 * @base: ttm base object used solely to release the lock i
72 struct mtx lock; member in struct:ttm_lock
220 ttm_lock_set_kill(struct ttm_lock *lock, bool val, int signal) argument
[all...]
/freebsd-11-stable/contrib/gcclibs/libgomp/config/posix/
H A Dlock.c47 omp_init_lock (omp_lock_t *lock) argument
49 pthread_mutex_init (lock, NULL);
53 omp_destroy_lock (omp_lock_t *lock) argument
55 pthread_mutex_destroy (lock);
59 omp_set_lock (omp_lock_t *lock) argument
61 pthread_mutex_lock (lock);
65 omp_unset_lock (omp_lock_t *lock) argument
67 pthread_mutex_unlock (lock);
71 omp_test_lock (omp_lock_t *lock) argument
73 return pthread_mutex_trylock (lock)
77 omp_init_nest_lock(omp_nest_lock_t *lock) argument
89 omp_destroy_nest_lock(omp_nest_lock_t *lock) argument
95 omp_set_nest_lock(omp_nest_lock_t *lock) argument
102 omp_unset_nest_lock(omp_nest_lock_t *lock) argument
109 omp_test_nest_lock(omp_nest_lock_t *lock) argument
[all...]
H A Domp-lock.h11 typedef struct { pthread_mutex_t lock; int count; } omp_nest_lock_t; member in struct:__anon1452
/freebsd-11-stable/sys/cddl/compat/opensolaris/sys/
H A Drwlock.h34 #include <sys/lock.h>
61 #define rw_init(lock, desc, type, arg) do { \
64 KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \
65 LO_EXPECTED, ("lock %s already initialized", #lock)); \
66 bzero((lock), sizeof(struct sx)); \
67 for (_name = #lock; *_name != '\0'; _name++) { \
72 _name = #lock; \
73 sx_init_flags((lock), _name, RW_FLAGS); \
75 #define rw_destroy(lock) sx_destro
[all...]
H A Dmutex.h35 #include <sys/lock.h>
55 #define mutex_init(lock, desc, type, arg) do { \
58 KASSERT(((lock)->lock_object.lo_flags & LO_ALLMASK) != \
59 LO_EXPECTED, ("lock %s already initialized", #lock)); \
60 for (_name = #lock; *_name != '\0'; _name++) { \
65 _name = #lock; \
66 sx_init_flags((lock), _name, MUTEX_FLAGS); \
68 #define mutex_destroy(lock) sx_destroy(lock)
[all...]
/freebsd-11-stable/tools/KSE/ksetest/
H A Dsimplelock.h40 simplelock_init(struct simplelock *lock) argument
42 lock->s_lock = 0;
46 simplelock_lock(struct simplelock *lock) argument
48 while (!atomic_cmpset_int(&lock->s_lock, 0, 1))
53 simplelock_unlock(struct simplelock *lock) argument
55 atomic_store_rel_int(&lock->s_lock, 0);
/freebsd-11-stable/tools/KSE/rr/
H A Dsimplelock.h40 simplelock_init(struct simplelock *lock) argument
42 lock->s_lock = 0;
46 simplelock_lock(struct simplelock *lock) argument
48 while (!atomic_cmpset_int(&lock->s_lock, 0, 1))
53 simplelock_unlock(struct simplelock *lock) argument
55 atomic_store_rel_int(&lock->s_lock, 0);
/freebsd-11-stable/sys/compat/linuxkpi/common/include/linux/
H A Drwlock.h35 #include <sys/lock.h>
47 #define read_lock_irq(lock) read_lock((lock))
48 #define read_unlock_irq(lock) read_unlock((lock))
49 #define write_lock_irq(lock) write_lock((lock))
50 #define write_unlock_irq(lock) write_unlock((lock))
51 #define read_lock_irqsave(lock, flag
61 rwlock_init(rwlock_t *lock) argument
[all...]
/freebsd-11-stable/contrib/gcclibs/libgomp/config/linux/
H A Dlock.c43 omp_init_lock (omp_lock_t *lock) argument
45 gomp_mutex_init (lock);
49 omp_destroy_lock (omp_lock_t *lock) argument
51 gomp_mutex_destroy (lock);
55 omp_set_lock (omp_lock_t *lock) argument
57 gomp_mutex_lock (lock);
61 omp_unset_lock (omp_lock_t *lock) argument
63 gomp_mutex_unlock (lock);
67 omp_test_lock (omp_lock_t *lock) argument
69 return __sync_bool_compare_and_swap (lock,
111 omp_init_nest_lock(omp_nest_lock_t *lock) argument
117 omp_destroy_nest_lock(omp_nest_lock_t *lock) argument
122 omp_set_nest_lock(omp_nest_lock_t *lock) argument
145 omp_unset_nest_lock(omp_nest_lock_t *lock) argument
157 omp_test_nest_lock(omp_nest_lock_t *lock) argument
[all...]
/freebsd-11-stable/contrib/unbound/util/
H A Dlocks.h49 * o lock_rw: lock that has many readers and one writer (to a data entry).
51 * This lock is meant for non performance sensitive uses.
52 * o lock_quick: speed lock. For performance sensitive locking of critical
86 #define lock_protect(lock, area, size) /* nop */
87 #define lock_unprotect(lock, area) /* nop */
88 #define lock_get_mem(lock) (0) /* nothing */
97 /** use pthread mutex for basic lock */
100 #define lock_basic_init(lock) LOCKRET(pthread_mutex_init(lock, NULL))
101 #define lock_basic_destroy(lock) LOCKRE
[all...]
/freebsd-11-stable/sys/dev/drm/
H A Ddrm_lock.c36 * hardware lock.
38 * The DRM hardware lock is a shared structure between the kernel and userland.
41 * client may take the lock without dropping down into the kernel, using atomic
45 * of the lock, it calls the DRM lock ioctl, which may sleep waiting for the
46 * lock, and may have side-effects of kernel-managed context switching.
48 * When the client releases the lock, if the lock is marked as being contended
57 struct drm_lock *lock = data; local
60 if (lock
111 struct drm_lock *lock = data; local
138 volatile unsigned int *lock = &lock_data->hw_lock->lock; local
169 volatile unsigned int *lock = &lock_data->hw_lock->lock; local
183 volatile unsigned int *lock = &lock_data->hw_lock->lock; local
[all...]
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-11-stable/crypto/heimdal/lib/hx509/
H A Dlock.c60 hx509_lock_init(hx509_context context, hx509_lock *lock) argument
65 *lock = NULL;
81 *lock = l;
87 hx509_lock_add_password(hx509_lock lock, const char *password) argument
96 d = realloc(lock->password.val,
97 (lock->password.len + 1) * sizeof(lock->password.val[0]));
102 lock->password.val = d;
103 lock->password.val[lock
110 _hx509_lock_get_passwords(hx509_lock lock) argument
116 _hx509_lock_unlock_certs(hx509_lock lock) argument
122 hx509_lock_reset_passwords(hx509_lock lock) argument
133 hx509_lock_add_cert(hx509_context context, hx509_lock lock, hx509_cert cert) argument
139 hx509_lock_add_certs(hx509_context context, hx509_lock lock, hx509_certs certs) argument
145 hx509_lock_reset_certs(hx509_context context, hx509_lock lock) argument
162 _hx509_lock_find_cert(hx509_lock lock, const hx509_query *q, hx509_cert *c) argument
169 hx509_lock_set_prompter(hx509_lock lock, hx509_prompter_fct prompt, void *data) argument
177 hx509_lock_reset_promper(hx509_lock lock) argument
207 hx509_lock_prompt(hx509_lock lock, hx509_prompt *prompt) argument
215 hx509_lock_free(hx509_lock lock) argument
240 hx509_lock_command_string(hx509_lock lock, const char *string) argument
[all...]
/freebsd-11-stable/contrib/ntp/sntp/libevent/
H A Devthread.c94 event_warnx("Trying to disable lock functions after "
105 target->lock == cbs->lock &&
110 event_warnx("Can't change lock callbacks once they have been "
114 if (cbs->alloc && cbs->free && cbs->lock && cbs->unlock) {
168 * lock to protect count. */
170 void *lock; member in struct:debug_lock
180 if (!(result->lock = original_lock_fns_.alloc(
186 result->lock = NULL;
198 struct debug_lock *lock local
213 evthread_debug_lock_mark_locked(unsigned mode, struct debug_lock *lock) argument
231 struct debug_lock *lock = lock_; local
246 evthread_debug_lock_mark_unlocked(unsigned mode, struct debug_lock *lock) argument
267 struct debug_lock *lock = lock_; local
279 struct debug_lock *lock = lock_; local
326 struct debug_lock *lock = lock_; local
340 struct debug_lock *lock = lock_; local
359 struct debug_lock *lock; local
383 struct debug_lock *lock = lock_; local
413 evthreadimpl_lock_free_(void *lock, unsigned locktype) argument
419 evthreadimpl_lock_lock_(unsigned mode, void *lock) argument
427 evthreadimpl_lock_unlock_(unsigned mode, void *lock) argument
455 evthreadimpl_cond_wait_(void *cond, void *lock, const struct timeval *tv) argument
[all...]
/freebsd-11-stable/lib/libthr/thread/
H A Dthr_pspinlock.c54 _pthread_spin_init(pthread_spinlock_t *lock, int pshared) argument
58 if (lock == NULL)
64 *lock = lck;
66 lck = __thr_pshared_offpage(lock, 1);
69 *lock = THR_PSHARED_PTR;
78 _pthread_spin_destroy(pthread_spinlock_t *lock) argument
83 if (lock == NULL || *lock == NULL) {
85 } else if (*lock == THR_PSHARED_PTR) {
86 l = __thr_pshared_offpage(lock,
99 _pthread_spin_trylock(pthread_spinlock_t *lock) argument
112 _pthread_spin_lock(pthread_spinlock_t *lock) argument
143 _pthread_spin_unlock(pthread_spinlock_t *lock) argument
[all...]
/freebsd-11-stable/sbin/hastd/
H A Dsynch.h51 mtx_init(pthread_mutex_t *lock) __requires_unlocked(*lock)
55 error = pthread_mutex_init(lock, NULL);
59 mtx_destroy(pthread_mutex_t *lock) __requires_unlocked(*lock)
63 error = pthread_mutex_destroy(lock);
67 mtx_lock(pthread_mutex_t *lock) __locks_exclusive(*lock)
71 error = pthread_mutex_lock(lock);
75 mtx_trylock(pthread_mutex_t *lock) __trylocks_exclusiv
92 mtx_owned(pthread_mutex_t *lock) argument
[all...]
/freebsd-11-stable/sys/contrib/ck/include/spinlock/
H A Danderson.h39 * This is an implementation of Anderson's array-based queuing lock.
58 ck_spinlock_anderson_init(struct ck_spinlock_anderson *lock, argument
71 lock->slots = slots;
72 lock->count = count;
73 lock->mask = count - 1;
74 lock->next = 0;
82 lock->wrap = (UINT_MAX % count) + 1;
84 lock->wrap = 0;
91 ck_spinlock_anderson_locked(struct ck_spinlock_anderson *lock) argument
96 position = ck_pr_load_uint(&lock
103 ck_spinlock_anderson_lock(struct ck_spinlock_anderson *lock, struct ck_spinlock_anderson_thread **slot) argument
150 ck_spinlock_anderson_unlock(struct ck_spinlock_anderson *lock, struct ck_spinlock_anderson_thread *slot) argument
[all...]
/freebsd-11-stable/sys/dev/drm2/
H A Ddrm_lock.c56 * Add the current task to the lock wait queue, and attempt to take to lock.
60 struct drm_lock *lock = data; local
66 if (lock->context == DRM_KERNEL_CONTEXT) {
68 DRM_CURRENTPID, lock->context);
72 DRM_DEBUG("%d (pid %d) requests lock (0x%08x), flags = 0x%08x\n",
73 lock->context, DRM_CURRENTPID,
74 master->lock.hw_lock->lock, lock
154 struct drm_lock *lock = data; local
189 volatile unsigned int *lock = &lock_data->hw_lock->lock; local
238 volatile unsigned int *lock = &lock_data->hw_lock->lock; local
263 volatile unsigned int *lock = &lock_data->hw_lock->lock; local
357 volatile unsigned int *lock = &lock_data->hw_lock->lock; local
[all...]
/freebsd-11-stable/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-11-stable/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_sbt(struct cv *cvp, struct lock_object *lock,
60 int _cv_timedwait_sig_sbt(struct cv *cvp, struct lock_object *lock,
66 #define cv_wait(cvp, lock) \
67 _cv_wait((cvp), &(lock)->lock_object)
68 #define cv_wait_unlock(cvp, lock) \
69 _cv_wait_unlock((cvp), &(lock)->lock_object)
70 #define cv_wait_sig(cvp, lock) \
[all...]

Completed in 163 milliseconds

1234567891011>>