Home
last modified time | relevance | path

Searched refs:lock (Results 76 – 100 of 483) sorted by relevance

12345678910>>...20

/Zephyr-latest/kernel/
Dpipes.c46 pipe->lock = (struct k_spinlock){}; in k_pipe_init()
114 k_spinlock_key_t key = k_spin_lock(&pipe->lock); in z_impl_k_pipe_flush()
138 k_spinlock_key_t key = k_spin_lock(&pipe->lock); in z_impl_k_pipe_buffer_flush()
144 k_spin_unlock(&pipe->lock, key); in z_impl_k_pipe_buffer_flush()
163 k_spinlock_key_t key = k_spin_lock(&pipe->lock); in k_pipe_cleanup()
167 k_spin_unlock(&pipe->lock, key); in k_pipe_cleanup()
190 k_spin_unlock(&pipe->lock, key); in k_pipe_cleanup()
407 k_spinlock_key_t key = k_spin_lock(&pipe->lock); in z_impl_k_pipe_put()
432 k_spin_unlock(&pipe->lock, key); in z_impl_k_pipe_put()
477 z_reschedule(&pipe->lock, key); in z_impl_k_pipe_put()
[all …]
Dfutex.c39 key = k_spin_lock(&futex_data->lock); in z_impl_k_futex_wake()
50 z_reschedule(&futex_data->lock, key); in z_impl_k_futex_wake()
81 key = k_spin_lock(&futex_data->lock); in z_impl_k_futex_wait()
83 ret = z_pend_curr(&futex_data->lock, in z_impl_k_futex_wait()
Dmailbox.c91 mbox->lock = (struct k_spinlock) {}; in k_mbox_init()
226 key = k_spin_lock(&mbox->lock); in mbox_message_put()
251 z_reschedule(&mbox->lock, key); in mbox_message_put()
261 int ret = z_pend_curr(&mbox->lock, key, NULL, K_FOREVER); in mbox_message_put()
273 k_spin_unlock(&mbox->lock, key); in mbox_message_put()
281 k_spin_unlock(&mbox->lock, key); in mbox_message_put()
288 int ret = z_pend_curr(&mbox->lock, key, &mbox->tx_msg_queue, timeout); in mbox_message_put()
394 key = k_spin_lock(&mbox->lock); in k_mbox_get()
405 k_spin_unlock(&mbox->lock, key); in k_mbox_get()
421 k_spin_unlock(&mbox->lock, key); in k_mbox_get()
[all …]
/Zephyr-latest/drivers/gpio/
Dgpio_altera_pio.c37 struct k_spinlock lock; member
91 key = k_spin_lock(&data->lock); in gpio_altera_configure()
101 k_spin_unlock(&data->lock, key); in gpio_altera_configure()
141 key = k_spin_lock(&data->lock); in gpio_altera_port_set_bits_raw()
151 k_spin_unlock(&data->lock, key); in gpio_altera_port_set_bits_raw()
175 key = k_spin_lock(&data->lock); in gpio_altera_port_clear_bits_raw()
185 k_spin_unlock(&data->lock, key); in gpio_altera_port_clear_bits_raw()
225 key = k_spin_lock(&data->lock); in gpio_altera_pin_interrupt_configure()
243 k_spin_unlock(&data->lock, key); in gpio_altera_pin_interrupt_configure()
269 key = k_spin_lock(&data->lock); in gpio_altera_irq_handler()
[all …]
Dgpio_tca6424a.c50 struct k_sem lock; member
190 k_sem_take(&drv_data->lock, K_FOREVER); in tca6424a_handle_interrupt()
194 k_sem_give(&drv_data->lock); in tca6424a_handle_interrupt()
202 k_sem_give(&drv_data->lock); in tca6424a_handle_interrupt()
212 k_sem_give(&drv_data->lock); in tca6424a_handle_interrupt()
308 k_sem_take(&drv_data->lock, K_FOREVER); in tca6424a_pin_config()
315 k_sem_give(&drv_data->lock); in tca6424a_pin_config()
330 k_sem_take(&drv_data->lock, K_FOREVER); in tca6424a_port_get_raw()
337 k_sem_give(&drv_data->lock); in tca6424a_port_get_raw()
353 k_sem_take(&drv_data->lock, K_FOREVER); in tca6424a_port_set_masked_raw()
[all …]
Dgpio_stmpe1600.c62 struct k_sem lock; member
168 k_sem_take(&drvdata->lock, K_FOREVER); in stmpe1600_configure()
176 k_sem_give(&drvdata->lock); in stmpe1600_configure()
190 k_sem_take(&drvdata->lock, K_FOREVER); in stmpe1600_port_get_raw()
192 k_sem_give(&drvdata->lock); in stmpe1600_port_get_raw()
212 k_sem_take(&drvdata->lock, K_FOREVER); in stmpe1600_port_set_masked_raw()
218 k_sem_give(&drvdata->lock); in stmpe1600_port_set_masked_raw()
242 k_sem_take(&drvdata->lock, K_FOREVER); in stmpe1600_port_toggle_bits()
248 k_sem_give(&drvdata->lock); in stmpe1600_port_toggle_bits()
261 k_sem_init(&drvdata->lock, 1, 1); in stmpe1600_init()
Dgpio_pcf857x.c36 struct k_sem lock; member
89 k_sem_take(&drv_data->lock, K_FOREVER); in pcf857x_work_handler()
98 k_sem_give(&drv_data->lock); in pcf857x_work_handler()
143 k_sem_take(&drv_data->lock, K_FOREVER); in pcf857x_port_get_raw()
151 k_sem_give(&drv_data->lock); in pcf857x_port_get_raw()
195 k_sem_take(&drv_data->lock, K_FOREVER); in pcf857x_port_set_raw()
197 k_sem_give(&drv_data->lock); in pcf857x_port_set_raw()
241 k_sem_take(&drv_data->lock, K_FOREVER); in pcf857x_pin_configure()
244 k_sem_give(&drv_data->lock); in pcf857x_pin_configure()
400 .lock = Z_SEM_INITIALIZER(pcf857x_data##idx.lock, 1, 1), \
Dgpio_andes_atcgpio100.c94 struct k_spinlock lock; member
124 key = k_spin_lock(&data->lock); in gpio_atcgpio100_config()
130 k_spin_unlock(&data->lock, key); in gpio_atcgpio100_config()
138 key = k_spin_lock(&data->lock); in gpio_atcgpio100_config()
154 k_spin_unlock(&data->lock, key); in gpio_atcgpio100_config()
177 k_spinlock_key_t key = k_spin_lock(&data->lock); in gpio_atcgpio100_set_masked_raw()
182 k_spin_unlock(&data->lock, key); in gpio_atcgpio100_set_masked_raw()
207 k_spinlock_key_t key = k_spin_lock(&data->lock); in gpio_atcgpio100_toggle_bits()
212 k_spin_unlock(&data->lock, key); in gpio_atcgpio100_toggle_bits()
251 key = k_spin_lock(&data->lock); in gpio_atcgpio100_pin_interrupt_configure()
[all …]
/Zephyr-latest/drivers/mfd/
Dmfd_nct38xx.c16 struct k_sem lock; member
28 k_sem_init(&data->lock, 1, 1); in mfd_nct38xx_init()
37 return &data->lock; in mfd_nct38xx_get_lock_reference()
Dmfd_aw9523b.c19 struct k_sem lock; member
33 k_sem_init(&data->lock, 1, 1); in mfd_aw9523b_init()
52 return &data->lock; in aw9523b_get_lock()
/Zephyr-latest/drivers/wifi/esp_at/
Desp_socket.c93 k_mutex_init(&sock->lock); in esp_socket_init()
192 if (sock->context->cond.lock) {
193 k_mutex_lock(sock->context->cond.lock, K_FOREVER);
196 k_mutex_lock(&sock->lock, K_FOREVER);
205 k_mutex_unlock(&sock->lock);
207 if (sock->context->cond.lock) {
208 k_mutex_unlock(sock->context->cond.lock);
247 k_mutex_lock(&sock->lock, K_FOREVER);
250 k_mutex_unlock(&sock->lock);
/Zephyr-latest/drivers/mbox/
Dmbox_esp32.c28 atomic_t lock; member
77 while (!atomic_cas(&dev_data->control->lock, ESP32_MBOX_LOCK_FREE_VAL, in esp32_mbox_isr()
93 atomic_set(&dev_data->control->lock, ESP32_MBOX_LOCK_FREE_VAL); in esp32_mbox_isr()
111 while (!atomic_cas(&dev_data->control->lock, ESP32_MBOX_LOCK_FREE_VAL, in esp32_mbox_send()
121 atomic_set(&dev_data->control->lock, ESP32_MBOX_LOCK_FREE_VAL); in esp32_mbox_send()
130 atomic_set(&dev_data->control->lock, ESP32_MBOX_LOCK_FREE_VAL); in esp32_mbox_send()
214 atomic_set(&data->control->lock, ESP32_MBOX_LOCK_FREE_VAL); in esp32_mbox_init()
226 while (!atomic_cas(&data->control->lock, ESP32_MBOX_LOCK_FREE_VAL, in esp32_mbox_init()
230 atomic_set(&data->control->lock, ESP32_MBOX_LOCK_FREE_VAL); in esp32_mbox_init()
/Zephyr-latest/drivers/timer/
Dintel_adsp_timer.c47 static struct k_spinlock lock; variable
109 k_spinlock_key_t key = k_spin_lock(&lock); in compare_isr()
129 k_spin_unlock(&lock, key); in compare_isr()
142 k_spinlock_key_t key = k_spin_lock(&lock); in sys_clock_set_timeout()
162 k_spin_unlock(&lock, key); in sys_clock_set_timeout()
171 k_spinlock_key_t key = k_spin_lock(&lock); in sys_clock_elapsed()
174 k_spin_unlock(&lock, key); in sys_clock_elapsed()
/Zephyr-latest/drivers/ps2/
Dps2_npcx_controller.c60 struct k_sem lock; member
92 k_sem_take(&data->lock, K_FOREVER); in ps2_npcx_ctrl_configure()
94 k_sem_give(&data->lock); in ps2_npcx_ctrl_configure()
106 k_sem_take(&data->lock, K_FOREVER); in ps2_npcx_ctrl_enable_interface()
116 k_sem_give(&data->lock); in ps2_npcx_ctrl_enable_interface()
132 k_sem_give(&data->lock); in ps2_npcx_ctrl_enable_interface()
172 k_sem_take(&data->lock, K_FOREVER); in ps2_npcx_ctrl_write()
215 k_sem_give(&data->lock); in ps2_npcx_ctrl_write()
219 k_sem_give(&data->lock); in ps2_npcx_ctrl_write()
372 k_sem_init(&data->lock, 1, 1); in ps2_npcx_ctrl_init()
/Zephyr-latest/lib/os/
Dp4wq.c80 k_spinlock_key_t k = k_spin_lock(&queue->lock); in p4wq_loop()
95 k_spin_unlock(&queue->lock, k); in p4wq_loop()
99 k = k_spin_lock(&queue->lock); in p4wq_loop()
110 z_pend_curr(&queue->lock, k, &queue->waitq, K_FOREVER); in p4wq_loop()
111 k = k_spin_lock(&queue->lock); in p4wq_loop()
217 k_spinlock_key_t k = k_spin_lock(&queue->lock); in k_p4wq_submit()
284 z_reschedule(&queue->lock, k); in k_p4wq_submit()
289 k_spin_unlock(&queue->lock, k); in k_p4wq_submit()
294 k_spinlock_key_t k = k_spin_lock(&queue->lock); in k_p4wq_cancel()
302 k_spin_unlock(&queue->lock, k); in k_p4wq_cancel()
/Zephyr-latest/drivers/wifi/nrf_wifi/off_raw_tx/src/
Doff_raw_tx_api.c147 key = k_spin_lock(&off_raw_tx_drv_priv.lock); in nrf70_off_raw_tx_init()
255 k_spin_unlock(&off_raw_tx_drv_priv.lock, key); in nrf70_off_raw_tx_init()
264 k_spin_unlock(&off_raw_tx_drv_priv.lock, key); in nrf70_off_raw_tx_init()
274 key = k_spin_lock(&off_raw_tx_drv_priv.lock); in nrf70_off_raw_tx_deinit()
277 k_spin_unlock(&off_raw_tx_drv_priv.lock, key); in nrf70_off_raw_tx_deinit()
284 k_spin_unlock(&off_raw_tx_drv_priv.lock, key); in nrf70_off_raw_tx_deinit()
323 key = k_spin_lock(&off_raw_tx_drv_priv.lock); in nrf70_off_raw_tx_conf_update()
378 k_spin_unlock(&off_raw_tx_drv_priv.lock, key); in nrf70_off_raw_tx_conf_update()
396 key = k_spin_lock(&off_raw_tx_drv_priv.lock); in nrf70_off_raw_tx_start()
411 k_spin_unlock(&off_raw_tx_drv_priv.lock, key); in nrf70_off_raw_tx_start()
[all …]
/Zephyr-latest/drivers/rtc/
Drtc_mc146818.c122 struct k_spinlock lock; member
180 k_spinlock_key_t key = k_spin_lock(&dev_data->lock); in rtc_mc146818_set_time()
212 k_spin_unlock(&dev_data->lock, key); in rtc_mc146818_set_time()
224 k_spinlock_key_t key = k_spin_lock(&dev_data->lock); in rtc_mc146818_get_time()
263 k_spin_unlock(&dev_data->lock, key); in rtc_mc146818_get_time()
310 k_spinlock_key_t key = k_spin_lock(&dev_data->lock); in rtc_mc146818_alarm_set_time()
348 k_spin_unlock(&dev_data->lock, key); in rtc_mc146818_alarm_set_time()
359 k_spinlock_key_t key = k_spin_lock(&dev_data->lock); in rtc_mc146818_alarm_get_time()
393 k_spin_unlock(&dev_data->lock, key); in rtc_mc146818_alarm_get_time()
406 k_spinlock_key_t key = k_spin_lock(&dev_data->lock); in rtc_mc146818_alarm_set_callback()
[all …]
Drtc_ambiq.c33 struct k_spinlock lock; member
122 k_spinlock_key_t key = k_spin_lock(&data->lock); in ambiq_rtc_set_time()
141 k_spin_unlock(&data->lock, key); in ambiq_rtc_set_time()
153 k_spinlock_key_t key = k_spin_lock(&data->lock); in ambiq_rtc_get_time()
169 k_spin_unlock(&data->lock, key); in ambiq_rtc_get_time()
203 k_spinlock_key_t key = k_spin_lock(&data->lock); in ambiq_rtc_alarm_get_time()
219 k_spin_unlock(&data->lock, key); in ambiq_rtc_alarm_get_time()
249 k_spinlock_key_t key = k_spin_lock(&data->lock); in ambiq_rtc_alarm_set_time()
284 k_spin_unlock(&data->lock, key); in ambiq_rtc_alarm_set_time()
298 K_SPINLOCK(&data->lock) { in ambiq_rtc_alarm_is_pending()
[all …]
Drtc_emul.c35 struct k_spinlock lock; member
221 K_SPINLOCK(&data->lock) { in rtc_emul_update()
243 K_SPINLOCK(&data->lock) in rtc_emul_set_time()
265 K_SPINLOCK(&data->lock) in rtc_emul_get_time()
319 K_SPINLOCK(&data->lock) in rtc_emul_alarm_set_time()
340 K_SPINLOCK(&data->lock) in rtc_emul_alarm_get_time()
358 K_SPINLOCK(&data->lock) in rtc_emul_alarm_is_pending()
377 K_SPINLOCK(&data->lock) in rtc_emul_alarm_set_callback()
393 K_SPINLOCK(&data->lock) in rtc_emul_update_set_callback()
408 K_SPINLOCK(&data->lock) in rtc_emul_set_calibration()
[all …]
/Zephyr-latest/drivers/ipm/
Dipm_esp32.c27 atomic_val_t lock; member
75 while (!atomic_cas(&dev_data->control->lock, ESP32_IPM_LOCK_FREE_VAL, in esp32_ipm_isr()
95 atomic_set(&dev_data->control->lock, ESP32_IPM_LOCK_FREE_VAL); in esp32_ipm_isr()
121 while (!atomic_cas(&dev_data->control->lock, in esp32_ipm_send()
144 atomic_set(&dev_data->control->lock, ESP32_IPM_LOCK_FREE_VAL); in esp32_ipm_send()
154 atomic_set(&dev_data->control->lock, ESP32_IPM_LOCK_FREE_VAL); in esp32_ipm_send()
238 atomic_set(&data->control->lock, ESP32_IPM_LOCK_FREE_VAL); in esp32_ipm_init()
257 while (!atomic_cas(&data->control->lock, in esp32_ipm_init()
262 atomic_set(&data->control->lock, ESP32_IPM_LOCK_FREE_VAL); in esp32_ipm_init()
/Zephyr-latest/tests/arch/arc/arc_vpx_lock/
DREADME.txt5 This test verifies that the ARC VPX lock/unlock mechanism used to bookend
7 lock/unlock mechanism does not technically require those registers to be
12 lock/unlock mechanism is used.
/Zephyr-latest/drivers/i2c/
Dgpio_i2c_switch.c31 struct k_mutex lock; member
48 res = k_mutex_lock(&data->lock, K_USEC(GPIO_I2C_LOCK_TIMEOUT_US)); in gpio_i2c_switch_transfer()
62 k_mutex_unlock(&data->lock); in gpio_i2c_switch_transfer()
80 k_mutex_init(&data->lock); in gpio_i2c_switch_init()
/Zephyr-latest/drivers/counter/
Dmaxim_ds3231.c84 struct k_sem lock; member
174 k_sem_take(&data->lock, K_FOREVER); in maxim_ds3231_ctrl_update()
178 k_sem_give(&data->lock); in maxim_ds3231_ctrl_update()
231 k_sem_take(&data->lock, K_FOREVER); in maxim_ds3231_stat_update()
235 k_sem_give(&data->lock); in maxim_ds3231_stat_update()
486 k_sem_take(&data->lock, K_FOREVER); in maxim_ds3231_get_alarm()
504 k_sem_give(&data->lock); in maxim_ds3231_get_alarm()
533 k_sem_take(&data->lock, K_FOREVER); in ds3231_counter_cancel_alarm()
537 k_sem_give(&data->lock); in ds3231_counter_cancel_alarm()
603 k_sem_take(&data->lock, K_FOREVER); in maxim_ds3231_set_alarm()
[all …]
Dcounter_dw_timer.c75 struct k_spinlock lock; member
97 key = k_spin_lock(&data->lock); in counter_dw_timer_irq_handler()
112 k_spin_unlock(&data->lock, key); in counter_dw_timer_irq_handler()
180 key = k_spin_lock(&data->lock); in counter_dw_timer_set_top_value()
184 k_spin_unlock(&data->lock, key); in counter_dw_timer_set_top_value()
210 k_spin_unlock(&data->lock, key); in counter_dw_timer_set_top_value()
242 key = k_spin_lock(&data->lock); in counter_dw_timer_set_alarm()
247 k_spin_unlock(&data->lock, key); in counter_dw_timer_set_alarm()
263 k_spin_unlock(&data->lock, key); in counter_dw_timer_set_alarm()
275 key = k_spin_lock(&data->lock); in counter_dw_timer_cancel_alarm()
[all …]
/Zephyr-latest/subsys/disk/
Ddisk_access.c25 static struct k_spinlock lock; variable
32 k_spinlock_key_t spinlock_key = k_spin_lock(&lock); in disk_access_get_di()
52 k_spin_unlock(&lock, spinlock_key); in disk_access_get_di()
185 spinlock_key = k_spin_lock(&lock); in disk_access_register()
189 k_spin_unlock(&lock, spinlock_key); in disk_access_register()
207 spinlock_key = k_spin_lock(&lock); in disk_access_unregister()
210 k_spin_unlock(&lock, spinlock_key); in disk_access_unregister()

12345678910>>...20