Home
last modified time | relevance | path

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

12345

/components/libc/posix/pthreads/
A Dpthread_spin.c15 if (!lock) in pthread_spin_init()
18 lock->lock = 0; in pthread_spin_init()
25 if (!lock) in pthread_spin_destroy()
33 if (!lock) in pthread_spin_lock()
36 while (!(lock->lock)) in pthread_spin_lock()
38 lock->lock = 1; in pthread_spin_lock()
46 if (!lock) in pthread_spin_trylock()
49 if (!(lock->lock)) in pthread_spin_trylock()
51 lock->lock = 1; in pthread_spin_trylock()
63 if (!(lock->lock)) in pthread_spin_unlock()
[all …]
A Dpthread_mutex.c313 result = rt_mutex_init(&(mutex->lock), name, RT_IPC_FLAG_PRIO); in pthread_mutex_init()
318 rt_object_detach(&(mutex->lock.parent.parent)); in pthread_mutex_init()
319 mutex->lock.parent.parent.type = RT_Object_Class_Mutex; in pthread_mutex_init()
356 if (mutex->lock.owner != RT_NULL) in pthread_mutex_destroy()
410 if (mutex->lock.owner == rt_thread_self() && in pthread_mutex_lock()
419 result = rt_mutex_take(&(mutex->lock), RT_WAITING_FOREVER); in pthread_mutex_lock()
466 if (mutex->lock.owner != rt_thread_self()) in pthread_mutex_unlock()
476 if (mutex->lock.owner == RT_NULL) in pthread_mutex_unlock()
480 result = rt_mutex_release(&(mutex->lock)); in pthread_mutex_unlock()
528 if (mutex->lock.owner == rt_thread_self() && in pthread_mutex_trylock()
[all …]
A Dpthread.h100 struct rt_mutex lock; member
128 int lock; member
267 int pthread_spin_init (pthread_spinlock_t *lock, int pshared);
268 int pthread_spin_destroy (pthread_spinlock_t *lock);
270 int pthread_spin_lock (pthread_spinlock_t * lock);
271 int pthread_spin_trylock (pthread_spinlock_t * lock);
272 int pthread_spin_unlock (pthread_spinlock_t * lock);
/components/libc/cplusplus/cpp11/gcc/
A Dcondition_variable44 void wait(unique_lock<mutex> &lock);
60 wait(lock);
67 if (!lock.owns_lock())
137 _m_lock.lock();
164 void wait(Lock &lock)
172 } // mut.unlock(); lock.lock();
178 wait(lock);
182 cv_status wait_until(Lock &lock,
194 bool wait_until(Lock &lock,
205 cv_status wait_for(Lock &lock,
[all …]
A Dmutex45 void lock()
51 throw_system_error(err, "mutex:lock failed.");
124 void lock()
194 lock();
251 void lock()
260 pm->lock();
363 if (l1.try_lock()) // lock the second one
398 // we first lock the one that is the most difficult to lock
439 void lock(L0& l0, L1& l1)
466 void lock(L0& l0, L1& l1, L2&... l2)
[all …]
/components/drivers/phye/
A Dphye.c45 rt_spin_lock(&phye->lock); in rt_phye_unregister()
76 rt_spin_lock(&phye->lock); in rt_phye_init()
88 rt_spin_unlock(&phye->lock); in rt_phye_init()
104 rt_spin_lock(&phye->lock); in rt_phye_exit()
119 rt_spin_unlock(&phye->lock); in rt_phye_exit()
135 rt_spin_lock(&phye->lock); in rt_phye_reset()
142 rt_spin_unlock(&phye->lock); in rt_phye_reset()
158 rt_spin_lock(&phye->lock); in rt_phye_power_on()
170 rt_spin_unlock(&phye->lock); in rt_phye_power_on()
186 rt_spin_lock(&phye->lock); in rt_phye_power_off()
[all …]
/components/drivers/pci/endpoint/
A Dendpoint.c31 rt_mutex_release(&ep->lock); in rt_pci_ep_write_header()
111 rt_mutex_release(&ep->lock); in rt_pci_ep_clear_bar()
137 rt_mutex_release(&ep->lock); in rt_pci_ep_map_addr()
163 rt_mutex_release(&ep->lock); in rt_pci_ep_unmap_addr()
223 rt_mutex_release(&ep->lock); in rt_pci_ep_get_msi()
250 rt_mutex_release(&ep->lock); in rt_pci_ep_set_msix()
276 rt_mutex_release(&ep->lock); in rt_pci_ep_get_msix()
302 rt_mutex_release(&ep->lock); in rt_pci_ep_raise_irq()
408 rt_mutex_detach(&ep->lock); in rt_pci_ep_unregister()
449 rt_mutex_release(&ep->lock); in rt_pci_ep_add_epf()
[all …]
A Dmem.c28 rt_mutex_take(&ep->lock, RT_WAITING_FOREVER); in rt_pci_ep_mem_array_init()
68 rt_mutex_release(&ep->lock); in rt_pci_ep_mem_array_init()
149 rt_mutex_take(&ep->lock, RT_WAITING_FOREVER); in rt_pci_ep_mem_alloc()
175 rt_mutex_release(&ep->lock); in rt_pci_ep_mem_alloc()
188 rt_mutex_take(&ep->lock, RT_WAITING_FOREVER); in rt_pci_ep_mem_free()
204 rt_mutex_release(&ep->lock); in rt_pci_ep_mem_free()
/components/drivers/core/
A Dpower_domain.c55 rt_spin_lock_init(&domain->lock); in dm_power_domain_init()
121 rt_hw_spin_lock(&domain->lock.lock); in rt_dm_power_domain_unregister_child()
132 rt_hw_spin_unlock(&domain->lock.lock); in rt_dm_power_domain_unregister_child()
147 rt_hw_spin_lock(&domain->lock.lock); in rt_dm_power_domain_power_on()
183 rt_hw_spin_unlock(&domain->lock.lock); in rt_dm_power_domain_power_on()
217 rt_hw_spin_lock(&domain->lock.lock); in rt_dm_power_domain_power_off()
257 rt_hw_spin_unlock(&domain->lock.lock); in rt_dm_power_domain_power_off()
405 rt_hw_spin_lock(&domain->lock.lock); in rt_dm_power_domain_attach()
417 rt_hw_spin_unlock(&domain->lock.lock); in rt_dm_power_domain_attach()
449 rt_hw_spin_lock(&domain->lock.lock); in rt_dm_power_domain_detach()
[all …]
/components/drivers/clk/
A Dclk.c192 rt_hw_spin_lock(&_clk_lock.lock); in clk_set_parent()
198 rt_hw_spin_unlock(&_clk_lock.lock); in clk_set_parent()
288 rt_hw_spin_lock(&_clk_lock.lock); in rt_clk_unregister()
327 rt_hw_spin_lock(&_clk_lock.lock); in rt_clk_notifier_register()
333 rt_hw_spin_unlock(&_clk_lock.lock); in rt_clk_notifier_register()
356 rt_hw_spin_lock(&_clk_lock.lock); in rt_clk_notifier_unregister()
369 rt_hw_spin_unlock(&_clk_lock.lock); in rt_clk_notifier_unregister()
419 rt_hw_spin_lock(&_clk_lock.lock); in rt_clk_prepare()
461 rt_hw_spin_lock(&_clk_lock.lock); in rt_clk_unprepare()
1260 rt_hw_spin_lock(&_clk_lock.lock); in ofw_get_clk()
[all …]
/components/drivers/ipc/
A Dpipe.c107 rt_mutex_release(&pipe->lock); in pipe_fops_open()
158 rt_mutex_release(&pipe->lock); in pipe_fops_close()
264 rt_mutex_release(&pipe->lock); in pipe_fops_read()
301 rt_mutex_take(&pipe->lock, -1); in pipe_fops_write()
327 rt_mutex_release(&pipe->lock); in pipe_fops_write()
332 rt_mutex_take(&pipe->lock, -1); in pipe_fops_write()
334 rt_mutex_release(&pipe->lock); in pipe_fops_write()
448 rt_mutex_release(&pipe->lock); in rt_pipe_open()
476 rt_mutex_release(&pipe->lock); in rt_pipe_close()
524 rt_mutex_release(&pipe->lock); in rt_pipe_read()
[all …]
/components/libc/cplusplus/cpp11/armclang/
A Dcondvar.cpp44 void arm_tpl_cv::wait(rt_mutex_t lock, bool recursive) in wait() argument
50 rt_mutex_release(lock); in wait()
52 rt_mutex_release(lock); in wait()
55 while (rt_mutex_take(lock, ARM_TPL_MAX_DELAY) != 0); in wait()
57 while (rt_mutex_take(lock, ARM_TPL_MAX_DELAY) != 0); in wait()
60 int arm_tpl_cv::timedwait(rt_mutex_t lock, bool recursive, unsigned int timeout_ms) in timedwait() argument
67 rt_mutex_release(lock); in timedwait()
69 rt_mutex_release(lock); in timedwait()
83 while (rt_mutex_take(lock, ARM_TPL_MAX_DELAY) != 0); in timedwait()
85 while (rt_mutex_take(lock, ARM_TPL_MAX_DELAY) != 0); in timedwait()
/components/libc/posix/io/eventfd/
A Deventfd.c39 struct rt_mutex lock; member
73 rt_mutex_detach(&ctx->lock); in eventfd_close()
138 rt_mutex_take(&ctx->lock, RT_WAITING_FOREVER); in eventfd_read()
145 rt_mutex_release(&ctx->lock); in eventfd_read()
151 rt_mutex_release(&ctx->lock); in eventfd_read()
154 rt_mutex_take(&ctx->lock, RT_WAITING_FOREVER); in eventfd_read()
170 rt_mutex_release(&ctx->lock); in eventfd_read()
211 rt_mutex_take(&ctx->lock, RT_WAITING_FOREVER); in eventfd_write()
227 rt_mutex_release(&ctx->lock); in eventfd_write()
239 rt_mutex_release(&ctx->lock); in eventfd_write()
[all …]
/components/drivers/regulator/
A Dregulator.c75 rt_hw_spin_lock(&_regulator_lock.lock); in rt_regulator_unregister()
102 rt_hw_spin_unlock(&_regulator_lock.lock); in rt_regulator_unregister()
117 rt_hw_spin_lock(&_regulator_lock.lock); in rt_regulator_notifier_register()
125 rt_hw_spin_unlock(&_regulator_lock.lock); in rt_regulator_notifier_register()
138 rt_hw_spin_lock(&_regulator_lock.lock); in rt_regulator_notifier_unregister()
142 rt_hw_spin_unlock(&_regulator_lock.lock); in rt_regulator_notifier_unregister()
270 rt_hw_spin_lock(&_regulator_lock.lock); in rt_regulator_enable()
327 rt_hw_spin_lock(&_regulator_lock.lock); in rt_regulator_disable()
412 rt_hw_spin_lock(&_regulator_lock.lock); in rt_regulator_set_voltage()
431 rt_hw_spin_lock(&_regulator_lock.lock); in rt_regulator_get_voltage()
[all …]
/components/dfs/dfs_v2/filesystems/tmpfs/
A Ddfs_tmpfs.c122 rt_spin_lock(&superblock->lock); in _free_subdir()
261 rt_spin_lock(&superblock->lock); in dfs_tmpfs_lookup()
284 rt_spin_unlock(&superblock->lock); in dfs_tmpfs_lookup()
567 rt_spin_lock(&superblock->lock); in dfs_tmpfs_unlink()
569 rt_spin_unlock(&superblock->lock); in dfs_tmpfs_unlink()
625 rt_spin_lock(&superblock->lock); in dfs_tmpfs_rename()
627 rt_spin_unlock(&superblock->lock); in dfs_tmpfs_rename()
631 rt_spin_lock(&superblock->lock); in dfs_tmpfs_rename()
633 rt_spin_unlock(&superblock->lock); in dfs_tmpfs_rename()
844 rt_spin_lock(&superblock->lock); in dfs_tmpfs_truncate()
[all …]
/components/libc/posix/io/timerfd/
A Dtimerfd.c40 struct rt_mutex lock; member
88 rt_mutex_detach(&tfd->lock); in timerfd_close()
106 rt_mutex_release(&tfd->lock); in timerfd_poll()
336 rt_mutex_release(&tfd->lock); in timerfd_timeout()
342 rt_mutex_release(&tfd->lock); in timerfd_timeout()
411 rt_mutex_release(&tfd->lock); in timerfd_do_settime()
427 rt_mutex_release(&tfd->lock); in timerfd_do_settime()
446 rt_mutex_release(&tfd->lock); in timerfd_do_settime()
458 rt_mutex_release(&tfd->lock); in timerfd_do_settime()
490 rt_mutex_release(&tfd->lock); in timerfd_do_settime()
[all …]
/components/libc/posix/io/signalfd/
A Dsignalfd.c31 struct rt_mutex lock; member
70 rt_mutex_detach(&sfd->lock); in signalfd_close()
95 rt_mutex_take(&sfd->lock, RT_WAITING_FOREVER); in signalfd_poll()
100 rt_mutex_release(&sfd->lock); in signalfd_poll()
159 rt_mutex_take(&sfd->lock, RT_WAITING_FOREVER); in signalfd_read()
179 rt_mutex_release(&sfd->lock); in signalfd_read()
203 rt_mutex_take(&sfd->lock, RT_WAITING_FOREVER); in signalfd_callback()
209 rt_mutex_release(&sfd->lock); in signalfd_callback()
227 rt_mutex_take(&sfd->lock, RT_WAITING_FOREVER); in signalfd_add_notify()
271 rt_mutex_release(&sfd->lock); in signalfd_add_notify()
[all …]
/components/drivers/pci/
A Dpci.c24 rt_hw_spin_lock(&spinlock->lock); in spin_lock()
737 struct rt_spinlock *lock; in rt_pci_enum_device() local
747 lock = &bus->lock; in rt_pci_enum_device()
749 spin_lock(lock); in rt_pci_enum_device()
756 spin_unlock(lock); in rt_pci_enum_device()
783 spin_unlock(lock); in rt_pci_enum_device()
790 spin_lock(lock); in rt_pci_enum_device()
794 spin_unlock(lock); in rt_pci_enum_device()
799 lock = &bus->lock; in rt_pci_enum_device()
808 spin_lock(lock); in rt_pci_enum_device()
[all …]
/components/drivers/spi/
A Ddev_spi_core.c40 rt_mutex_init(&(bus->lock), name, RT_IPC_FLAG_PRIO); in spi_bus_register()
161 rt_mutex_release(&(device->bus->lock)); in rt_spi_bus_configure()
192 rt_mutex_release(&(device->bus->lock)); in rt_spi_configure()
228 result = rt_mutex_take(&(device->bus->lock), RT_WAITING_FOREVER); in rt_spi_send_then_send()
286 rt_mutex_release(&(device->bus->lock)); in rt_spi_send_then_send()
303 result = rt_mutex_take(&(device->bus->lock), RT_WAITING_FOREVER); in rt_spi_send_then_recv()
361 rt_mutex_release(&(device->bus->lock)); in rt_spi_send_then_recv()
419 rt_mutex_release(&(device->bus->lock)); in rt_spi_transfer()
518 rt_mutex_release(&(device->bus->lock)); in rt_spi_transfer_message()
549 rt_mutex_release(&(device->bus->lock)); in rt_spi_take_bus()
[all …]
/components/drivers/pic/
A Dpic.c688 rt_hw_spin_lock(&pirq->rw_lock.lock); in rt_pic_irq_enable()
695 rt_hw_spin_unlock(&pirq->rw_lock.lock); in rt_pic_irq_enable()
704 rt_hw_spin_lock(&pirq->rw_lock.lock); in rt_pic_irq_disable()
711 rt_hw_spin_unlock(&pirq->rw_lock.lock); in rt_pic_irq_disable()
720 rt_hw_spin_lock(&pirq->rw_lock.lock); in rt_pic_irq_ack()
727 rt_hw_spin_unlock(&pirq->rw_lock.lock); in rt_pic_irq_ack()
736 rt_hw_spin_lock(&pirq->rw_lock.lock); in rt_pic_irq_mask()
752 rt_hw_spin_lock(&pirq->rw_lock.lock); in rt_pic_irq_unmask()
768 rt_hw_spin_lock(&pirq->rw_lock.lock); in rt_pic_irq_eoi()
992 rt_hw_spin_lock(&pirq->rw_lock.lock); in rt_pic_irq_set_state()
[all …]
/components/libc/posix/io/epoll/
A Depoll.c60 struct rt_mutex lock; /**< Mutex lock */ member
140 rt_mutex_release(&ep->lock); in epoll_close()
141 rt_mutex_detach(&ep->lock); in epoll_close()
180 rt_mutex_release(&ep->lock); in epoll_poll()
287 rt_mutex_release(&ep->lock); in epoll_ctl_install()
446 rt_mutex_release(&ep->lock); in epoll_ctl_add()
451 rt_mutex_release(&ep->lock); in epoll_ctl_add()
467 rt_mutex_release(&ep->lock); in epoll_ctl_add()
535 rt_mutex_release(&ep->lock); in epoll_ctl_del()
576 rt_mutex_release(&ep->lock); in epoll_ctl_mod()
[all …]
/components/drivers/sensor/v1/
A Dsensor.c160 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in rt_sensor_open()
220 rt_mutex_release(sensor->module->lock); in rt_sensor_open()
236 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in rt_sensor_close()
279 rt_mutex_release(sensor->module->lock); in rt_sensor_close()
298 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in rt_sensor_read()
326 rt_mutex_release(sensor->module->lock); in rt_sensor_read()
341 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in rt_sensor_control()
409 rt_mutex_release(sensor->module->lock); in rt_sensor_control()
459 if (sensor->module != RT_NULL && sensor->module->lock == RT_NULL) in rt_hw_sensor_register()
462 sensor->module->lock = rt_mutex_create(name, RT_IPC_FLAG_PRIO); in rt_hw_sensor_register()
[all …]
/components/dfs/dfs_v1/filesystems/tmpfs/
A Ddfs_tmpfs.c107 rt_spin_lock(&superblock->lock); in _free_subdir()
109 rt_spin_unlock(&superblock->lock); in _free_subdir()
135 rt_spin_lock_init(&superblock->lock); in dfs_tmpfs_mount()
250 rt_spin_lock(&superblock->lock); in dfs_tmpfs_lookup()
274 rt_spin_unlock(&superblock->lock); in dfs_tmpfs_lookup()
580 rt_spin_lock(&superblock->lock); in dfs_tmpfs_unlink()
582 rt_spin_unlock(&superblock->lock); in dfs_tmpfs_unlink()
619 rt_spin_lock(&superblock->lock); in dfs_tmpfs_rename()
621 rt_spin_unlock(&superblock->lock); in dfs_tmpfs_rename()
625 rt_spin_lock(&superblock->lock); in dfs_tmpfs_rename()
[all …]
/components/dfs/dfs_v2/filesystems/devfs/
A Ddevtmpfs.c133 rt_spin_lock(&superblock->lock);
135 rt_spin_unlock(&superblock->lock);
159 rt_spin_lock_init(&superblock->lock); in devtmpfs_mount()
217 rt_spin_lock(&superblock->lock); in devtmpfs_file_lookup()
233 rt_spin_unlock(&superblock->lock); in devtmpfs_file_lookup()
237 rt_spin_unlock(&superblock->lock); in devtmpfs_file_lookup()
377 rt_spin_lock(&superblock->lock); in devtmpfs_symlink()
449 rt_spin_lock(&superblock->lock); in devtmpfs_unlink()
451 rt_spin_unlock(&superblock->lock); in devtmpfs_unlink()
551 rt_spin_lock(&superblock->lock); in devtmpfs_create_vnode()
[all …]
/components/drivers/sensor/v2/
A Dsensor.c155 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in _sensor_open()
223 rt_mutex_release(sensor->module->lock); in _sensor_open()
239 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in _sensor_close()
282 rt_mutex_release(sensor->module->lock); in _sensor_close()
301 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in _sensor_read()
329 rt_mutex_release(sensor->module->lock); in _sensor_read()
345 rt_mutex_take(sensor->module->lock, RT_WAITING_FOREVER); in _sensor_control()
433 rt_mutex_release(sensor->module->lock); in _sensor_control()
482 if (sensor->module != RT_NULL && sensor->module->lock == RT_NULL) in rt_hw_sensor_register()
485 sensor->module->lock = rt_mutex_create(name, RT_IPC_FLAG_PRIO); in rt_hw_sensor_register()
[all …]

Completed in 36 milliseconds

12345