/darwin-on-arm/xnu/osfmk/mach/i386/ |
H A D | flipc_dep.h | 53 * Flipc simple lock defines. These are almost completely for the use 60 * These locks may be declared by "flipc_simple_lock lock;". If they 74 #define flipc_simple_lock_init(lock) \ 76 *(lock) = SIMPLE_LOCK_INITIALIZER; \ 83 #define flipc_simple_lock_locked(lock) ((*lock) != SIMPLE_LOCK_INITIALIZER) 86 extern __inline__ int flipc_simple_lock_try(flipc_simple_lock *lock) argument 89 __asm__ volatile("movl $1, %0; xchgl %0, %1" : "=&r" (r), "=m" (*lock)); 94 extern __inline__ void flipc_simple_lock_release(flipc_simple_lock *lock) argument 98 __asm__ volatile("xorl %0, %0; xchgl %0, %1" : "=&r" (t), "=m" (*lock)); [all...] |
/darwin-on-arm/xnu/iokit/Kernel/ |
H A D | IOLocks.cpp | 40 void IOLockInitWithState( IOLock * lock, IOLockState state) argument 43 lck_mtx_lock( lock); 51 void IOLockFree( IOLock * lock) argument 53 lck_mtx_free( lock, IOLockGroup); 56 lck_mtx_t * IOLockGetMachLock( IOLock * lock) argument 58 return( (lck_mtx_t *)lock); 61 int IOLockSleep( IOLock * lock, void *event, UInt32 interType) argument 63 return (int) lck_mtx_sleep(lock, LCK_SLEEP_DEFAULT, (event_t) event, (wait_interrupt_t) interType); 66 int IOLockSleepDeadline( IOLock * lock, void *event, argument 69 return (int) lck_mtx_sleep_deadline(lock, LCK_SLEEP_DEFAUL 73 IOLockWakeup(IOLock * lock, void *event, bool oneThread) argument 88 _IORecursiveLock * lock; local 118 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 131 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 146 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 165 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 177 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 184 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 206 _IORecursiveLock * lock = (_IORecursiveLock *)_lock; local 240 IORWLockFree( IORWLock * lock) argument 245 IORWLockGetMachLock( IORWLock * lock) argument 260 IOSimpleLockInit( IOSimpleLock * lock) argument 270 IOSimpleLockGetMachLock( IOSimpleLock * lock) argument [all...] |
H A D | IOStatistics.cpp | 70 IORWLock *IOStatistics::lock = NULL; member in class:IOStatistics 189 lock = IORWLockAlloc(); 190 if (!lock) { 230 IORWLockWrite(lock); 239 IORWLockUnlock(lock); 254 IORWLockWrite(lock); 296 IORWLockUnlock(lock); 319 IORWLockWrite(lock); 363 IORWLockUnlock(lock); 378 IORWLockWrite(lock); [all...] |
/darwin-on-arm/xnu/iokit/IOKit/ |
H A D | IOLocks.h | 54 Global lock group used by all IOKit locks. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. 63 * Mutex lock operations 75 @discussion Allocates a mutex in general purpose memory, and initializes it. Mutexes are general purpose blocking mutual exclusion locks, supplied by libkern/locks.h. This function may block and so should not be called from interrupt level or while a spin lock is held. IOLocks use the global IOKit lock group, IOLockGroup. To simplify kext debugging and lock-heat analysis, consider using lck_* locks with a per-driver lock group, as defined in kern/locks.h. 76 @result Pointer to the allocated lock, or zero on failure. */ 82 @discussion Frees a lock allocate 158 IOTakeLock( IOLock * lock) argument 159 IOTryLock( IOLock * lock) argument 160 IOUnlock( IOLock * lock) argument 297 IOReadLock( IORWLock * lock) argument 298 IOWriteLock( IORWLock * lock) argument 299 IORWUnlock( IORWLock * lock) argument 403 IOSimpleLockUnlockEnableInterrupt( IOSimpleLock * lock, IOInterruptState state ) argument [all...] |
/darwin-on-arm/xnu/osfmk/mach/ |
H A D | flipc_locks.h | 57 * Separated the lock macros out into machine dependent and independent files; 82 /* Get the simple lock type. */ 86 * Lock function prototypes. This needs to be before any lock definitions 90 /* Initializes lock. Always a macro (so that kernel code can use it without 92 void flipc_simple_lock_init(flipc_simple_lock *lock); 94 /* Returns 1 if lock gained, 0 otherwise. */ 95 int flipc_simple_lock_try(flipc_simple_lock *lock); 97 /* Returns 1 if lock is locked, 0 otherwise. */ 98 int flipc_simple_lock_locked(flipc_simple_lock *lock); 100 /* Releases the lock [all...] |
/darwin-on-arm/xnu/osfmk/kern/ |
H A D | lock.h | 57 * File: kern/lock.h 70 #include <machine/lock.h> 82 lock_t *lock, 95 lock_t *lock); 98 lock_t *lock); 101 lock_t *lock); 104 lock_t *lock); 107 lock_t *lock); 113 lock_t *lock); 119 usimple_lock_t lock, [all...] |
H A D | sync_lock.h | 36 * Contains RT distributed lock synchronization service definitions. 53 queue_chain_t held_link; /* ulocks held in the lock set */ 55 struct lock_set *lock_set; /* the retaining lock set */ 56 thread_t holder; /* thread that holds the lock */ 60 decl_lck_mtx_data(,lock) /* ulock lock */ 73 queue_chain_t task_link; /* lock sets owned by a task MUST BE FIRST */ 74 task_t owner; /* task that owns the lock set */ 75 ipc_port_t port; /* lock set port */ 76 decl_lck_mtx_data(,lock) /* loc [all...] |
H A D | host.h | 80 decl_lck_mtx_data(,lock) /* lock to protect exceptions */ 89 #define host_lock(host) lck_mtx_lock(&(host)->lock) 90 #define host_unlock(host) lck_mtx_unlock(&(host)->lock)
|
H A D | mk_timer.h | 46 decl_simple_lock_data(,lock);
|
H A D | mk_timer.c | 83 simple_lock_init(&timer->lock, 0); 109 simple_lock(&timer->lock); 121 simple_unlock(&timer->lock); 128 simple_unlock(&timer->lock); 152 simple_lock(&timer->lock); 156 simple_unlock(&timer->lock); 168 simple_unlock(&timer->lock); 179 simple_lock(&timer->lock); 183 simple_unlock(&timer->lock); 190 simple_unlock(&timer->lock); [all...] |
H A D | spl.c | 29 #include <kern/lock.h>
|
H A D | locks.c | 110 * Obtain "lcks" options:this currently controls lock statistics 309 return panic("lck_grp_lckcnt_incr(): invalid lock type: %d\n", lck_type); 337 return panic("lck_grp_lckcnt_decr(): invalid lock type: %d\n", lck_type); 441 panic("Invalid lock sleep action %x\n", lck_sleep_action); 472 panic("Invalid lock sleep action %x\n", lck_sleep_action); 505 panic("Invalid lock sleep action %x\n", lck_sleep_action); 545 panic("Invalid lock sleep action %x\n", lck_sleep_action); 866 panic("Invalid lock sleep action %x\n", lck_sleep_action); 904 panic("Invalid lock sleep action %x\n", lck_sleep_action); 1016 extern void lock_done_EXT(lck_rw_t *lock); 1049 lock_done_EXT( lck_rw_t *lock) argument 1056 lock_free_EXT( lck_rw_t *lock) argument 1063 lock_init_EXT( lck_rw_t *lock, __unused boolean_t can_sleep, __unused unsigned short tag0, __unused unsigned short tag1) argument 1073 lock_read_EXT( lck_rw_t *lock) argument 1080 lock_read_to_write_EXT( lck_rw_t *lock) argument 1087 lock_write_EXT( lck_rw_t *lock) argument 1094 lock_write_to_read_EXT( lck_rw_t *lock) argument 1101 thread_sleep_lock_write_EXT( event_t event, lck_rw_t *lock, wait_interrupt_t interruptible) argument 1110 usimple_lock_EXT( lck_spin_t *lock) argument 1117 usimple_lock_init_EXT( lck_spin_t *lock, __unused unsigned short tag) argument 1125 usimple_lock_try_EXT( lck_spin_t *lock) argument 1132 usimple_unlock_EXT( lck_spin_t *lock) argument 1139 thread_sleep_usimple_lock_EXT( event_t event, lck_spin_t *lock, wait_interrupt_t interruptible) argument [all...] |
H A D | kalloc.h | 78 #include <kern/lock.h>
|
H A D | sync_sema.h | 48 #include <kern/lock.h> 53 struct wait_queue wait_queue; /* queue of blocked threads & lock */
|
H A D | task_swap.c | 40 #include <kern/lock.h>
|
H A D | timer_call.c | 124 simple_lock_init(&(call)->lock, 0); 133 * by the queue lock and the call entry lock. The locking protocol is: 137 * 1) With only the entry lock held, entry.queue is valid: 145 * 2) If a queue lock is obtained first, the queue is stable: 146 * 2a) If a try-lock of a queued entry succeeds, the call can be operated on 148 * 2b) If a try-lock fails, it indicates that another thread is attempting 152 * the entry.queue pointer (protected by the entry lock we don't own). 173 if (!hw_lock_held((hw_lock_t)&entry->lock)) 177 * XXX The queue lock i [all...] |
/darwin-on-arm/xnu/bsd/kern/ |
H A D | kern_lockf.c | 66 #include <sys/lock.h> 89 void lf_print(const char *tag, struct lockf *lock); 90 void lf_printlist(const char *tag, struct lockf *lock); 116 * Overlapping lock states 143 * lock operation to be attempted. 166 struct lockf *lock; local 180 LOCKF_DEBUG(0, "lf_advlock: '%s' unlock without lock\n", vfs_context_proc(context)->p_comm); 251 MALLOC(lock, struct lockf *, sizeof *lock, M_LOCKF, M_WAITOK); 252 if (lock 313 struct lockf *lock; local 366 lf_coalesce_adjacent(struct lockf *lock) argument 442 lf_setlock(struct lockf *lock) argument 872 lf_getlock(struct lockf *lock, struct flock *fl, pid_t matchpid) argument 916 lf_getblock(struct lockf *lock, pid_t matchpid) argument 988 lf_findoverlap(struct lockf *lf, struct lockf *lock, int type, struct lockf ***prev, struct lockf **overlap) argument 1230 lf_print(const char *tag, struct lockf *lock) argument 1270 lf_printlist(const char *tag, struct lockf *lock) argument [all...] |
/darwin-on-arm/xnu/tools/tests/libMicro/ |
H A D | mutex.c | 48 pthread_mutex_t *lock; variable 64 "notes: measures uncontended pthread_mutex_[un,]lock\n"); 114 lock = (pthread_mutex_t *)mmap(NULL, 120 if (lock == MAP_FAILED) { 128 if (pthread_mutex_init(lock, &attr) != 0) 152 ts->ts_lock = lock;
|
/darwin-on-arm/xnu/iokit/Kernel/x86_64/ |
H A D | IOSharedLock.s | 33 * Unlock the lock pointed to by p. 48 * Try to lock p. Return zero if not successful. 56 lock
|
/darwin-on-arm/xnu/libkern/x86_64/ |
H A D | OSAtomic.s | 42 lock 64 lock 84 lock 102 lock
|
/darwin-on-arm/xnu/osfmk/i386/commpage/ |
H A D | commpage_asm.s | 49 lock 57 lock 70 lock 78 lock
|
H A D | fifo_queues.s | 53 * Because they cannot be implemented reasonably without a lock, we put the "atomic" 125 lock 131 lock 137 lock 170 lock 176 lock 182 lock 270 lock 276 lock 282 lock [all...] |
/darwin-on-arm/xnu/libsyscall/custom/ |
H A D | __vfork.s | 64 lock 72 lock 85 lock 105 lock 114 lock 127 lock 150 swp r1, r2, [r3] // look at the value, lock others out 187 swp r1, r2, [r3] // look at the value, lock others out
|
/darwin-on-arm/xnu/osfmk/arm/ |
H A D | mp.h | 73 #include <kern/lock.h> 77 decl_simple_lock_data(extern, kdb_lock); /* kdb lock */
|
/darwin-on-arm/xnu/iokit/Kernel/i386/ |
H A D | IOSharedLock.s | 33 * Unlock the lock pointed to by p. 49 * Try to lock p. Return zero if not successful. 57 lock
|