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

123

/seL4-test-master/projects/musllibc/src/thread/
H A Dlock_ptc.c3 static pthread_rwlock_t lock = PTHREAD_RWLOCK_INITIALIZER; variable
7 pthread_rwlock_wrlock(&lock);
12 pthread_rwlock_rdlock(&lock);
17 pthread_rwlock_unlock(&lock);
H A D__unmapself.c7 static volatile int lock; variable
23 while (lock || a_cas(&lock, 0, tid))
25 __syscall(SYS_set_tid_address, &lock);
H A Dpthread_atfork.c11 static volatile int lock[2]; variable
18 LOCK(lock);
29 UNLOCK(lock);
38 LOCK(lock);
46 UNLOCK(lock);
H A Dsem_open.c23 static volatile int lock[2]; variable
43 LOCK(lock);
46 UNLOCK(lock);
61 UNLOCK(lock);
66 UNLOCK(lock);
140 LOCK(lock);
151 UNLOCK(lock);
157 LOCK(lock);
159 UNLOCK(lock);
166 LOCK(lock);
[all...]
/seL4-test-master/projects/util_libs/libplatsupport/include/platsupport/sync/
H A Dspinlock.h24 static inline int sync_spinlock_init(sync_spinlock_t *lock) { argument
25 *lock = 0;
29 static inline int sync_spinlock_lock(sync_spinlock_t *lock) { argument
32 if (__atomic_compare_exchange_n(lock, &expected, 1, 1, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) {
39 static inline int sync_spinlock_trylock(sync_spinlock_t *lock) { argument
41 return !__atomic_compare_exchange_n(lock, &expected, 1, 0, __ATOMIC_ACQUIRE, __ATOMIC_RELAXED);
44 static inline int sync_spinlock_unlock(sync_spinlock_t *lock) { argument
45 __atomic_store_n(lock, 0, __ATOMIC_RELEASE);
49 static inline int sync_spinlock_destroy(sync_spinlock_t *lock) { argument
/seL4-test-master/projects/musllibc/src/exit/
H A Dat_quick_exit.c8 static volatile int lock[2]; variable
13 LOCK(lock);
16 UNLOCK(lock);
18 LOCK(lock);
25 LOCK(lock);
27 UNLOCK(lock);
H A Datexit.c16 static volatile int lock[2]; variable
21 LOCK(lock);
25 UNLOCK(lock);
27 LOCK(lock);
37 LOCK(lock);
46 UNLOCK(lock);
59 UNLOCK(lock);
/seL4-test-master/projects/musllibc/src/stdio/
H A D__lockfile.c7 if (f->lock == tid)
9 while ((owner = a_cas(&f->lock, 0, tid)))
10 __wait(&f->lock, &f->waiters, owner, 1);
16 a_store(&f->lock, 0);
27 if (f->waiters) __wake(&f->lock, 1, 1);
H A Dflockfile.c7 int owner = f->lock;
8 if (owner) __wait(&f->lock, &f->waiters, owner, 1);
H A Dfgetc.c6 if (f->lock < 0 || !__lockfile(f))
H A Dfputc.c5 if (f->lock < 0 || !__lockfile(f))
H A Dgetc.c6 if (f->lock < 0 || !__lockfile(f))
H A Dftrylockfile.c9 a_store(&f->lock, 0x40000000);
25 if (f->lock == tid) {
31 if (f->lock < 0) f->lock = 0;
32 if (f->lock || a_cas(&f->lock, 0, tid))
H A Dputc.c5 if (f->lock < 0 || !__lockfile(f))
/seL4-test-master/projects/musllibc/src/dirent/
H A D__dirent.h7 volatile int lock[2]; member in struct:__dirstream
H A Drewinddir.c8 LOCK(dir->lock);
12 UNLOCK(dir->lock);
H A Dseekdir.c8 LOCK(dir->lock);
11 UNLOCK(dir->lock);
H A Dreaddir_r.c13 LOCK(dir->lock);
17 UNLOCK(dir->lock);
24 UNLOCK(dir->lock);
/seL4-test-master/tools/riscv-pk/machine/
H A Datomic.h13 typedef struct { int lock; } spinlock_t; member in struct:__anon668
43 static inline int spinlock_trylock(spinlock_t* lock) argument
45 int res = atomic_swap(&lock->lock, -1);
50 static inline void spinlock_lock(spinlock_t* lock) argument
54 while (atomic_read(&lock->lock))
56 } while (spinlock_trylock(lock));
59 static inline void spinlock_unlock(spinlock_t* lock) argument
62 atomic_set(&lock
65 spinlock_lock_irqsave(spinlock_t* lock) argument
72 spinlock_unlock_irqrestore(spinlock_t* lock, long flags) argument
[all...]
/seL4-test-master/kernel/include/arch/arm/arch/64/mode/smp/
H A Dipi.h11 #include <smp/lock.h>
/seL4-test-master/projects/util_libs/libplatsupport/src/plat/zynq7000/
H A Dsrc.c17 #define SLCR_LOCK_OFFSET 0x000 /* Offset of lock registers */
26 uint32_t lock; /* 0x004 32 W 00000000h */ member in struct:slcr_lock_regs
33 slcr_lock_regs_t lock; member in struct:slcr_regs
55 r->lock.unlock = UNLOCK_KEY;
56 return !(r->lock.locksta & SLCR_LOCKSTA_LOCKED);
63 r->lock.lock = LOCK_KEY;
64 return !!(r->lock.locksta & SLCR_LOCKSTA_LOCKED);
/seL4-test-master/projects/musllibc/src/malloc/
H A Dlite_malloc.c14 static volatile int lock[2]; local
22 LOCK(lock);
32 UNLOCK(lock);
45 UNLOCK(lock);
/seL4-test-master/projects/musllibc/src/prng/
H A Drandom.c25 static volatile int lock[2]; variable
66 LOCK(lock);
68 UNLOCK(lock);
76 LOCK(lock);
91 UNLOCK(lock);
98 LOCK(lock);
101 UNLOCK(lock);
108 LOCK(lock);
120 UNLOCK(lock);
/seL4-test-master/projects/seL4_libs/libsel4sync/include/sync/
H A Dcondition_var.h54 * This assumes that you already hold the lock and will block until notified
55 * by sync_cv_signal or sync_cv_broadcast. It returns once you hold the lock
58 * @param lock The lock on the monitor.
61 static inline int sync_cv_wait(sync_bin_sem_t *lock, sync_cv_t *cv) argument
68 /* Increment waiters count and release the lock */
71 int error = sync_bin_sem_post(lock);
79 /* Reacquire the lock */
80 error = sync_bin_sem_wait(lock);
103 * This assumes that you hold the lock an
145 sync_cv_broadcast_release(sync_bin_sem_t *lock, sync_cv_t *cv) argument
[all...]
/seL4-test-master/projects/musllibc/src/locale/
H A Dsetlocale.c24 static volatile int lock[2]; local
28 LOCK(lock);
61 UNLOCK(lock);
67 UNLOCK(lock);

Completed in 102 milliseconds

123