Home
last modified time | relevance | path

Searched refs:lock (Results 1 – 25 of 52) sorted by relevance

123

/lk-master/kernel/include/kernel/
A Dspinlock.h17 arch_spin_lock(lock); in spin_lock()
22 return arch_spin_trylock(lock); in spin_trylock()
27 arch_spin_unlock(lock); in spin_unlock()
31 arch_spin_lock_init(lock); in spin_lock_init()
51 spin_lock_t *lock, in spin_lock_save() argument
55 spin_lock(lock); in spin_lock_save()
60 spin_lock_t *lock, in spin_unlock_restore() argument
63 spin_unlock(lock); in spin_unlock_restore()
112 explicit AutoSpinLock(SpinLock *lock) : AutoSpinLock(&lock->lock_) {} in AutoSpinLock() argument
132 explicit AutoSpinLockNoIrqSave(spin_lock_t *lock) : lock_(lock) { spin_lock(lock_); } in AutoSpinLockNoIrqSave() argument
[all …]
/lk-master/arch/riscv/include/arch/
A Dspinlock.h23 void riscv_spin_lock(spin_lock_t *lock);
24 void riscv_spin_unlock(spin_lock_t *lock);
25 int riscv_spin_trylock(spin_lock_t *lock);
27 static inline int arch_spin_trylock(spin_lock_t *lock) { in arch_spin_trylock() argument
28 return riscv_spin_trylock(lock); in arch_spin_trylock()
31 static inline void arch_spin_lock(spin_lock_t *lock) { in arch_spin_lock() argument
32 riscv_spin_lock(lock); in arch_spin_lock()
35 static inline void arch_spin_unlock(spin_lock_t *lock) { in arch_spin_unlock() argument
36 riscv_spin_unlock(lock); in arch_spin_unlock()
40 *lock = SPIN_LOCK_INITIAL_VALUE; in arch_spin_lock_init()
[all …]
/lk-master/arch/arm/include/arch/
A Dspinlock.h25 *lock = SPIN_LOCK_INITIAL_VALUE; in arch_spin_lock_init()
29 return *lock != 0; in arch_spin_lock_held()
34 void arch_spin_lock(spin_lock_t *lock);
35 int arch_spin_trylock(spin_lock_t *lock);
36 void arch_spin_unlock(spin_lock_t *lock);
41 static inline void arch_spin_lock(spin_lock_t *lock) { in arch_spin_lock() argument
43 DEBUG_ASSERT(*lock == 0); in arch_spin_lock()
44 *lock = 1; in arch_spin_lock()
49 DEBUG_ASSERT(*lock == 0); in arch_spin_trylock()
55 DEBUG_ASSERT(*lock != 0); in arch_spin_unlock()
[all …]
/lk-master/arch/arm64/include/arch/
A Dspinlock.h24 void arch_spin_lock(spin_lock_t *lock);
25 int arch_spin_trylock(spin_lock_t *lock);
26 void arch_spin_unlock(spin_lock_t *lock);
28 static inline void arch_spin_lock(spin_lock_t *lock) { in arch_spin_lock() argument
29 *lock = 1; in arch_spin_lock()
32 static inline int arch_spin_trylock(spin_lock_t *lock) { in arch_spin_trylock() argument
36 static inline void arch_spin_unlock(spin_lock_t *lock) { in arch_spin_unlock() argument
37 *lock = 0; in arch_spin_unlock()
41 static inline void arch_spin_lock_init(spin_lock_t *lock) { in arch_spin_lock_init() argument
42 *lock = SPIN_LOCK_INITIAL_VALUE; in arch_spin_lock_init()
[all …]
/lk-master/arch/x86/include/arch/
A Dspinlock.h22 static inline void arch_spin_lock_init(spin_lock_t *lock) { in arch_spin_lock_init() argument
23 *lock = SPIN_LOCK_INITIAL_VALUE; in arch_spin_lock_init()
26 static inline bool arch_spin_lock_held(spin_lock_t *lock) { in arch_spin_lock_held() argument
27 return *lock != 0; in arch_spin_lock_held()
30 static inline void arch_spin_lock(spin_lock_t *lock) { in arch_spin_lock() argument
31 *lock = 1; in arch_spin_lock()
34 static inline int arch_spin_trylock(spin_lock_t *lock) { in arch_spin_trylock() argument
38 static inline void arch_spin_unlock(spin_lock_t *lock) { in arch_spin_unlock() argument
39 *lock = 0; in arch_spin_unlock()
/lk-master/arch/m68k/include/arch/
A Dspinlock.h24 static inline void arch_spin_lock(spin_lock_t *lock) { in arch_spin_lock() argument
25 *lock = 1; in arch_spin_lock()
28 static inline int arch_spin_trylock(spin_lock_t *lock) { in arch_spin_trylock() argument
32 static inline void arch_spin_unlock(spin_lock_t *lock) { in arch_spin_unlock() argument
33 *lock = 0; in arch_spin_unlock()
36 static inline void arch_spin_lock_init(spin_lock_t *lock) { in arch_spin_lock_init() argument
37 *lock = SPIN_LOCK_INITIAL_VALUE; in arch_spin_lock_init()
40 static inline bool arch_spin_lock_held(spin_lock_t *lock) { in arch_spin_lock_held() argument
41 return *lock != 0; in arch_spin_lock_held()
/lk-master/arch/microblaze/include/arch/
A Dspinlock.h24 static inline void arch_spin_lock(spin_lock_t *lock) { in arch_spin_lock() argument
25 *lock = 1; in arch_spin_lock()
28 static inline int arch_spin_trylock(spin_lock_t *lock) { in arch_spin_trylock() argument
32 static inline void arch_spin_unlock(spin_lock_t *lock) { in arch_spin_unlock() argument
33 *lock = 0; in arch_spin_unlock()
36 static inline void arch_spin_lock_init(spin_lock_t *lock) { in arch_spin_lock_init() argument
37 *lock = SPIN_LOCK_INITIAL_VALUE; in arch_spin_lock_init()
40 static inline bool arch_spin_lock_held(spin_lock_t *lock) { in arch_spin_lock_held() argument
41 return *lock != 0; in arch_spin_lock_held()
/lk-master/arch/mips/include/arch/
A Dspinlock.h24 static inline void arch_spin_lock(spin_lock_t *lock) { in arch_spin_lock() argument
25 *lock = 1; in arch_spin_lock()
28 static inline int arch_spin_trylock(spin_lock_t *lock) { in arch_spin_trylock() argument
32 static inline void arch_spin_unlock(spin_lock_t *lock) { in arch_spin_unlock() argument
33 *lock = 0; in arch_spin_unlock()
36 static inline void arch_spin_lock_init(spin_lock_t *lock) { in arch_spin_lock_init() argument
37 *lock = SPIN_LOCK_INITIAL_VALUE; in arch_spin_lock_init()
40 static inline bool arch_spin_lock_held(spin_lock_t *lock) { in arch_spin_lock_held() argument
41 return *lock != 0; in arch_spin_lock_held()
/lk-master/arch/or1k/include/arch/
A Dspinlock.h24 static inline void arch_spin_lock(spin_lock_t *lock) { in arch_spin_lock() argument
25 *lock = 1; in arch_spin_lock()
28 static inline int arch_spin_trylock(spin_lock_t *lock) { in arch_spin_trylock() argument
32 static inline void arch_spin_unlock(spin_lock_t *lock) { in arch_spin_unlock() argument
33 *lock = 0; in arch_spin_unlock()
36 static inline void arch_spin_lock_init(spin_lock_t *lock) { in arch_spin_lock_init() argument
37 *lock = SPIN_LOCK_INITIAL_VALUE; in arch_spin_lock_init()
40 static inline bool arch_spin_lock_held(spin_lock_t *lock) { in arch_spin_lock_held() argument
41 return *lock != 0; in arch_spin_lock_held()
/lk-master/external/platform/pico/rp2_common/hardware_sync/include/hardware/
A Dsync.h196 inline static uint spin_lock_get_num(spin_lock_t *lock) { in spin_lock_get_num() argument
197 return lock - (spin_lock_t *) (SIO_BASE + SIO_SPINLOCK0_OFFSET); in spin_lock_get_num()
205 inline static void spin_lock_unsafe_blocking(spin_lock_t *lock) { in spin_lock_unsafe_blocking() argument
209 while (__builtin_expect(!*lock, 0)); in spin_lock_unsafe_blocking()
218 inline static void spin_unlock_unsafe(spin_lock_t *lock) { in spin_unlock_unsafe() argument
220 *lock = 0; in spin_unlock_unsafe()
231 inline static uint32_t spin_lock_blocking(spin_lock_t *lock) { in spin_lock_blocking() argument
233 spin_lock_unsafe_blocking(lock); in spin_lock_blocking()
242 inline static bool is_spin_locked(const spin_lock_t *lock) { in is_spin_locked() argument
244 uint32_t lock_num = lock - spin_lock_instance(0); in is_spin_locked()
[all …]
/lk-master/arch/riscv/
A Dspinlock.c12 int riscv_spin_trylock(spin_lock_t *lock) { in riscv_spin_trylock() argument
19 : "=r"(old), "+A"(*lock) in riscv_spin_trylock()
27 void riscv_spin_lock(spin_lock_t *lock) { in riscv_spin_lock() argument
31 if (*lock) { in riscv_spin_lock()
39 : "=r"(old), "+A"(*lock) in riscv_spin_lock()
50 void riscv_spin_unlock(spin_lock_t *lock) { in riscv_spin_unlock() argument
52 *lock = 0; in riscv_spin_unlock()
/lk-master/lib/fs/memfs/
A Dmemfs.c25 mutex_t lock; member
67 mutex_init(&mem->lock); in memfs_mount()
85 mutex_acquire(&mem->lock); in memfs_unmount()
93 mutex_release(&mem->lock); in memfs_unmount()
117 mutex_acquire(&mem->lock); in memfs_create()
152 mutex_release(&mem->lock); in memfs_create()
165 mutex_acquire(&mem->lock); in memfs_open()
167 mutex_release(&mem->lock); in memfs_open()
185 mutex_acquire(&mem->lock); in memfs_remove()
189 mutex_release(&mem->lock); in memfs_remove()
[all …]
/lk-master/external/platform/pico/rp2_common/hardware_timer/
A Dtimer.c104 spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_TIMER); in hardware_alarm_irq_handler() local
105 uint32_t save = spin_lock_blocking(lock); in hardware_alarm_irq_handler()
123 spin_unlock(lock, save); in hardware_alarm_irq_handler()
136 spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_TIMER); in hardware_alarm_set_callback() local
137 uint32_t save = spin_lock_blocking(lock); in hardware_alarm_set_callback()
154 spin_unlock(lock, save); in hardware_alarm_set_callback()
168 uint32_t save = spin_lock_blocking(lock); in hardware_alarm_set_target()
192 spin_unlock(lock, save); in hardware_alarm_set_target()
200 spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_TIMER); in hardware_alarm_cancel() local
201 uint32_t save = spin_lock_blocking(lock); in hardware_alarm_cancel()
[all …]
/lk-master/dev/bus/pci/
A Dpci.cpp26 SpinLock lock; variable
44 AutoSpinLock guard(&lock); in pci_find_pci_device()
56 AutoSpinLock guard(&lock); in pci_find_pci_class_code()
66 AutoSpinLock guard(&lock); in pci_read_config_byte()
75 AutoSpinLock guard(&lock); in pci_read_config_half()
85 AutoSpinLock guard(&lock); in pci_read_config_word()
95 AutoSpinLock guard(&lock); in pci_write_config_byte()
105 AutoSpinLock guard(&lock); in pci_write_config_half()
115 AutoSpinLock guard(&lock); in pci_write_config_word()
133 AutoSpinLock guard(&lock); in pci_get_irq_routing_options()
[all …]
/lk-master/lib/watchdog/
A Dwatchdog.c21 static spin_lock_t lock = SPIN_LOCK_INITIAL_VALUE; variable
53 spin_lock_irqsave(&lock, state); in watchdog_set_enabled()
67 spin_unlock_irqrestore(&lock, state); in watchdog_set_enabled()
72 spin_lock_irqsave(&lock, state); in watchdog_pet()
83 spin_unlock_irqrestore(&lock, state); in watchdog_pet()
104 spin_lock_irqsave(&lock, state); in watchdog_hw_set_enabled()
120 spin_unlock_irqrestore(&lock, state); in watchdog_hw_set_enabled()
/lk-master/external/lib/lwip/
A Dsys_arch.c70 mutex_init(&mbox->lock); in sys_mbox_new()
93 mutex_acquire(&mbox->lock); in sys_mbox_post()
98 mutex_release(&mbox->lock); in sys_mbox_post()
114 mutex_acquire(&mbox->lock); in sys_arch_mbox_tryfetch()
119 mutex_release(&mbox->lock); in sys_arch_mbox_tryfetch()
139 mutex_acquire(&mbox->lock); in sys_arch_mbox_fetch()
144 mutex_release(&mbox->lock); in sys_arch_mbox_fetch()
159 mutex_acquire(&mbox->lock); in sys_mbox_trypost()
164 mutex_release(&mbox->lock); in sys_mbox_trypost()
/lk-master/external/platform/pico/common/pico_util/
A Dqueue.c12 q->lock = spin_lock_instance(spinlock_num); in queue_init_with_spinlock()
38 uint32_t flags = spin_lock_blocking(q->lock); in queue_try_add()
44 spin_unlock(q->lock, flags); in queue_try_add()
51 uint32_t flags = spin_lock_blocking(q->lock); in queue_try_remove()
57 spin_unlock(q->lock, flags); in queue_try_remove()
64 uint32_t flags = spin_lock_blocking(q->lock); in queue_try_peek()
69 spin_unlock(q->lock, flags); in queue_try_peek()
/lk-master/lib/cbuf/
A Dcbuf.c37 spin_lock_init(&cbuf->lock); in cbuf_initialize_etc()
60 spin_lock_irqsave(&cbuf->lock, state); in cbuf_write()
101 spin_unlock_irqrestore(&cbuf->lock, state); in cbuf_write()
122 spin_lock_irqsave(&cbuf->lock, state); in cbuf_read()
159 spin_unlock_irqrestore(&cbuf->lock, state); in cbuf_read()
172 spin_lock_irqsave(&cbuf->lock, state); in cbuf_peek()
191 spin_unlock_irqrestore(&cbuf->lock, state); in cbuf_peek()
199 spin_lock_irqsave(&cbuf->lock, state); in cbuf_write_char()
212 spin_unlock_irqrestore(&cbuf->lock, state); in cbuf_write_char()
226 spin_lock_irqsave(&cbuf->lock, state); in cbuf_read_char()
[all …]
/lk-master/platform/pc/
A Dinterrupts.c22 static spin_lock_t lock; variable
143 spin_lock_irqsave(&lock, state); in mask_interrupt()
147 spin_unlock_irqrestore(&lock, state); in mask_interrupt()
171 spin_lock_irqsave(&lock, state); in unmask_interrupt()
175 spin_unlock_irqrestore(&lock, state); in unmask_interrupt()
204 spin_lock_irqsave(&lock, state); in register_int_handler()
209 spin_unlock_irqrestore(&lock, state); in register_int_handler()
/lk-master/kernel/novm/
A Dnovm.c23 mutex_t lock; member
97 mutex_init(&n->lock); in novm_init_helper()
159 mutex_acquire(&n->lock); in novm_alloc_helper()
171 mutex_release(&n->lock); in novm_alloc_helper()
175 mutex_release(&n->lock); in novm_alloc_helper()
213 mutex_acquire(&n->lock); in novm_free_pages()
215 mutex_release(&n->lock); in novm_free_pages()
236 mutex_acquire(&n->lock); in novm_alloc_specific_pages()
246 mutex_release(&n->lock); in novm_alloc_specific_pages()
299 mutex_acquire(&n->lock); in novm_dump_arena()
[all …]
/lk-master/external/platform/pico/rp2_common/hardware_irq/
A Dirq.c110 spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_IRQ); in irq_set_exclusive_handler() local
111 uint32_t save = spin_lock_blocking(lock); in irq_set_exclusive_handler()
123 spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_IRQ); in irq_get_exclusive_handler() local
124 uint32_t save = spin_lock_blocking(lock); in irq_get_exclusive_handler()
126 spin_unlock(lock, save); in irq_get_exclusive_handler()
188 spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_IRQ); in irq_add_shared_handler()
189 uint32_t save = spin_lock_blocking(lock); in irq_add_shared_handler()
257 spin_lock_t *lock = spin_lock_instance(PICO_SPINLOCK_ID_IRQ); in irq_remove_handler() local
258 uint32_t save = spin_lock_blocking(lock); in irq_remove_handler()
371 uint32_t save = spin_lock_blocking(lock); in irq_add_tail_to_free_list()
[all …]
/lk-master/platform/qemu-mips/
A Dintc.c22 static spin_lock_t lock; variable
179 spin_lock_irqsave(&lock, state); in mask_interrupt()
183 spin_unlock_irqrestore(&lock, state); in mask_interrupt()
206 spin_lock_irqsave(&lock, state); in unmask_interrupt()
210 spin_unlock_irqrestore(&lock, state); in unmask_interrupt()
253 spin_lock_irqsave(&lock, state); in register_int_handler()
258 spin_unlock_irqrestore(&lock, state); in register_int_handler()
/lk-master/external/platform/pico/common/pico_time/
A Dtime.c27 spin_lock_t *lock; member
113 uint32_t save = spin_lock_blocking(pool->lock); in alarm_pool_alarm_callback()
133 spin_unlock(pool->lock, save); in alarm_pool_alarm_callback()
136 save = spin_lock_blocking(pool->lock); in alarm_pool_alarm_callback()
151 spin_unlock(pool->lock, save); in alarm_pool_alarm_callback()
191 uint32_t save = spin_lock_blocking(pool->lock); in alarm_pool_add_alarm_at()
195 spin_unlock(pool->lock, save); in alarm_pool_add_alarm_at()
221 uint32_t save = spin_lock_blocking(pool->lock); in alarm_pool_cancel_alarm()
239 spin_unlock(pool->lock, save); in alarm_pool_cancel_alarm()
286 uint32_t save = spin_lock_blocking(pool->lock); in alarm_pool_dump()
[all …]
/lk-master/lib/minip/
A Dtcp.c81 mutex_t lock; member
395 mutex_acquire(&s->lock); in tcp_input()
574 mutex_release(&s->lock); in tcp_input()
839 mutex_acquire(&s->lock); in handle_retransmit_timeout()
847 mutex_release(&s->lock); in handle_retransmit_timeout()
858 mutex_acquire(&s->lock); in handle_delayed_ack_timeout()
860 mutex_release(&s->lock); in handle_delayed_ack_timeout()
871 mutex_acquire(&s->lock); in handle_time_wait_timeout()
879 mutex_release(&s->lock); in handle_time_wait_timeout()
917 mutex_init(&s->lock); in create_tcp_socket()
[all …]
/lk-master/dev/virtio/gpu/
A Dvirtio-gpu.c38 mutex_t lock; member
113 mutex_acquire(&gdev->lock); in get_display_info()
150 mutex_release(&gdev->lock); in get_display_info()
164 mutex_acquire(&gdev->lock); in allocate_2d_resource()
187 mutex_release(&gdev->lock); in allocate_2d_resource()
201 mutex_acquire(&gdev->lock); in attach_backing()
233 mutex_release(&gdev->lock); in attach_backing()
244 mutex_acquire(&gdev->lock); in set_scanout()
267 mutex_release(&gdev->lock); in set_scanout()
278 mutex_acquire(&gdev->lock); in flush_resource()
[all …]

Completed in 36 milliseconds

123