Home
last modified time | relevance | path

Searched refs:sync_sem (Results 1 – 22 of 22) sorted by relevance

/Zephyr-latest/tests/kernel/events/sys_event/src/
Dmain.c32 static K_SEM_DEFINE(sync_sem, 0, 1);
82 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
91 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
100 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
109 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
118 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
127 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
136 k_sem_take(&sync_sem, K_FOREVER); in reset_on_receive()
143 k_sem_take(&sync_sem, K_FOREVER); in reset_on_receive()
149 k_sem_take(&sync_sem, K_FOREVER); in reset_on_receive()
[all …]
/Zephyr-latest/tests/kernel/events/event_api/src/
Dtest_event_apis.c28 static K_SEM_DEFINE(sync_sem, 0, 1);
84 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
93 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
102 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
111 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
120 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
129 k_sem_take(&sync_sem, K_FOREVER); in receive_existing_events()
138 k_sem_take(&sync_sem, K_FOREVER); in reset_on_wait()
145 k_sem_take(&sync_sem, K_FOREVER); in reset_on_wait()
152 k_sem_take(&sync_sem, K_FOREVER); in reset_on_wait()
[all …]
/Zephyr-latest/tests/kernel/threads/thread_apis/src/
Dtest_essential_thread.c20 K_SEM_DEFINE(sync_sem, 0, 1);
42 k_sem_give(&sync_sem); in thread_entry()
59 k_sem_take(&sync_sem, K_FOREVER); in ZTEST()
88 k_sem_give(&sync_sem); in abort_thread_entry()
110 k_sem_take(&sync_sem, K_FOREVER); in ZTEST()
/Zephyr-latest/tests/kernel/semaphore/sys_sem/src/
Dmain.c25 static struct k_sem usage_sem, sync_sem, limit_sem, uninit_sem; variable
57 k_sem_give(&sync_sem); in thread_low_prio_sem_take()
65 k_sem_give(&sync_sem); in thread_high_prio_sem_take()
81 k_sem_init(&sync_sem, SEM_INIT_VAL, SEM_MAX_VAL); in ZTEST_USER()
109 k_sem_take(&sync_sem, K_FOREVER); in ZTEST_USER()
113 k_sem_take(&sync_sem, K_FOREVER); in ZTEST_USER()
142 k_sem_take(&sync_sem, K_FOREVER); in multi_thread_sem_give()
159 k_sem_give(&sync_sem); in multi_thread_sem_take()
176 k_sem_init(&sync_sem, SEM_INIT_VAL, SEM_MAX_VAL); in ZTEST_USER()
204 k_thread_access_grant(k_current_get(), &usage_sem, &sync_sem, &limit_sem, in test_init()
/Zephyr-latest/tests/kernel/workq/work/src/
Dmain.c38 static struct k_sem sync_sem; variable
132 zassert_equal(k_sem_take(&sync_sem, K_NO_WAIT), -EBUSY); in reset_counters()
156 k_sem_give(&sync_sem); in counter_handler()
312 rc = k_sem_take(&sync_sem, K_NO_WAIT); in ZTEST()
348 rc = k_sem_take(&sync_sem, K_NO_WAIT); in ZTEST()
382 rc = k_sem_take(&sync_sem, K_FOREVER); in ZTEST()
414 rc = k_sem_take(&sync_sem, K_FOREVER); in ZTEST()
422 rc = k_sem_take(&sync_sem, K_FOREVER); in ZTEST()
458 rc = k_sem_take(&sync_sem, K_NO_WAIT); in ZTEST()
494 rc = k_sem_take(&sync_sem, K_NO_WAIT); in ZTEST()
[all …]
/Zephyr-latest/tests/kernel/pipe/pipe/src/
Dmain.c11 extern struct k_sem put_sem, get_sem, sync_sem, multiple_send_sem;
19 &sync_sem, &multiple_send_sem, in pipe_setup()
Dtest_pipe.c23 K_SEM_DEFINE(sync_sem, 0, 1);
210 k_sem_give(&sync_sem); in pipe_get_single()
292 k_sem_give(&sync_sem); in pipe_get_multiple()
395 k_sem_give(&sync_sem); in pipe_get_forever_wait()
525 k_sem_give(&sync_sem); in pipe_get_timeout()
638 k_sem_give(&sync_sem); in pipe_get_forever_timeout()
741 k_sem_take(&sync_sem, K_FOREVER); in ZTEST_USER()
762 k_sem_take(&sync_sem, K_FOREVER); in ZTEST_USER()
780 k_sem_take(&sync_sem, K_FOREVER); in ZTEST_USER()
831 k_sem_take(&sync_sem, K_FOREVER); in ZTEST_USER()
[all …]
/Zephyr-latest/tests/kernel/mem_protect/mem_protect/src/
Dinherit.c27 K_SEM_DEFINE(sync_sem, SEM_INIT_VAL, SEM_MAX_VAL);
142 k_sem_give(&sync_sem); in child_handler()
176 k_sem_reset(&sync_sem); in ZTEST()
184 k_sem_take(&sync_sem, K_FOREVER); in ZTEST()
/Zephyr-latest/tests/kernel/interrupt/src/
Dinterrupt_offload.c23 static struct k_sem sync_sem; variable
142 k_sem_give(&sync_sem); in t_running()
155 k_sem_init(&sync_sem, 0, 1); in init_env()
201 k_sem_take(&sync_sem, K_FOREVER); in run_test_offload()
/Zephyr-latest/drivers/i2c/
Di2c_gd32.c47 struct k_sem sync_sem; member
105 k_sem_give(&data->sync_sem); in i2c_gd32_handle_rbne()
112 k_sem_give(&data->sync_sem); in i2c_gd32_handle_rbne()
158 k_sem_give(&data->sync_sem); in i2c_gd32_handle_tbe()
180 k_sem_give(&data->sync_sem); in i2c_gd32_handle_btc()
287 k_sem_give(&data->sync_sem); in i2c_gd32_error_isr()
315 k_sem_reset(&data->sync_sem); in i2c_gd32_xfer_begin()
378 k_sem_take(&data->sync_sem, K_FOREVER); in i2c_gd32_msg_read()
395 k_sem_take(&data->sync_sem, K_FOREVER); in i2c_gd32_msg_write()
668 k_sem_init(&data->sync_sem, 0, K_SEM_MAX_LIMIT); in i2c_gd32_init()
Di2c_npcx_controller.c153 struct k_sem sync_sem; /* semaphore used for synchronization */ member
528 k_sem_give(&data->sync_sem); in i2c_ctrl_notify()
535 if (k_sem_take(&data->sync_sem, I2C_TRANS_TIMEOUT) == 0) { in i2c_ctrl_wait_completion()
1200 k_sem_reset(&data->sync_sem); in npcx_i2c_ctrl_transfer()
1290 k_sem_init(&data->sync_sem, 0, K_SEM_MAX_LIMIT); in i2c_ctrl_init()
/Zephyr-latest/tests/subsys/zbus/hlp_priority_boost/src/
Dmain.c89 static K_SEM_DEFINE(sync_sem, 1, 1);
101 k_sem_take(&sync_sem, K_FOREVER); in publisher_thread()
110 k_sem_give(&sync_sem); in _pub_and_sync()
/Zephyr-latest/drivers/mipi_dbi/
Dmipi_dbi_smartbond.c62 struct k_sem sync_sem; member
108 k_sem_take(&data->sync_sem, K_FOREVER); in mipi_dbi_smartbond_send_single_frame()
117 k_sem_take(&data->sync_sem, K_FOREVER); in mipi_dbi_smartbond_send_single_frame()
437 k_sem_give(&data->sync_sem); in smartbond_mipi_dbi_isr()
519 k_sem_init(&data->sync_sem, 0, 1); in mipi_dbi_smartbond_init()
/Zephyr-latest/tests/bluetooth/hci_prop_evt/src/
Dmain.c279 struct k_sem sync_sem; in bt_recv_job_submit() local
286 k_sem_init(&sync_sem, 0, 1); in bt_recv_job_submit()
287 job(buf)->sync = &sync_sem; in bt_recv_job_submit()
293 k_sem_take(&sync_sem, K_FOREVER); in bt_recv_job_submit()
/Zephyr-latest/drivers/crypto/
Dcrypto_smartbond.c81 struct k_sem sync_sem; member
115 k_sem_give(&data->sync_sem); in smartbond_crypto_isr()
548 k_sem_take(&data->sync_sem, K_FOREVER); in crypto_smartbond_cipher_ecb_handler()
631 k_sem_take(&data->sync_sem, K_FOREVER); in crypto_smartbond_cipher_cbc_handler()
701 k_sem_take(&data->sync_sem, K_FOREVER); in crypto_smartbond_cipher_ctr_handler()
776 k_sem_take(&data->sync_sem, K_FOREVER); in crypto_smartbond_hash_handler()
977 k_sem_init(&data->sync_sem, 0, 1); in crypto_smartbond_init()
/Zephyr-latest/subsys/usb/device_next/class/
Dbt_hci.c116 struct k_sem sync_sem; member
191 k_sem_take(&hci_data->sync_sem, K_FOREVER); in bt_hci_tx_sync_in()
384 k_sem_give(&hci_data->sync_sem); in bt_hci_request()
643 .sync_sem = Z_SEM_INITIALIZER(bt_hci_data_##n.sync_sem, 0, 1), \
Dusbd_cdc_ecm.c91 struct k_sem sync_sem; member
300 k_sem_give(&data->sync_sem); in usbd_cdc_ecm_request()
523 k_sem_take(&data->sync_sem, K_FOREVER); in cdc_ecm_send()
822 .sync_sem = Z_SEM_INITIALIZER(eth_data_##n.sync_sem, 0, 1), \
Dusbd_cdc_ncm.c233 struct k_sem sync_sem; member
653 k_sem_give(&data->sync_sem); in usbd_cdc_ncm_request()
1082 k_sem_take(&data->sync_sem, K_FOREVER); in cdc_ncm_send()
1383 .sync_sem = Z_SEM_INITIALIZER(eth_data_##n.sync_sem, 0, 1), \
/Zephyr-latest/tests/bluetooth/host_long_adv_recv/src/
Dmain.c291 struct k_sem sync_sem; in bt_recv_job_submit() local
298 k_sem_init(&sync_sem, 0, 1); in bt_recv_job_submit()
299 job(buf)->sync = &sync_sem; in bt_recv_job_submit()
308 k_sem_take(&sync_sem, K_FOREVER); in bt_recv_job_submit()
/Zephyr-latest/drivers/display/
Ddisplay_renesas_lcdc.c61 struct k_sem sync_sem; member
208 k_sem_give(&data->sync_sem); in smartbond_display_isr()
324 k_sem_init(&data->sync_sem, 0, 1); in display_smartbond_init()
544 k_sem_take(&data->sync_sem, K_FOREVER); in display_smartbond_write()
/Zephyr-latest/drivers/i3c/
Di3c_npcx.c221 struct k_sem sync_sem; /* Semaphore used for synchronization */ member
276 k_sem_give(&data->sync_sem); in i3c_ctrl_notify()
283 return k_sem_take(&data->sync_sem, I3C_TRANS_TIMEOUT_MS); in i3c_ctrl_wait_completion()
2919 k_sem_init(&data->sync_sem, 0, 1); in npcx_i3c_init()
/Zephyr-latest/subsys/bluetooth/host/
Dhci_core.c376 struct k_sem sync_sem; in bt_hci_cmd_send_sync() local
399 k_sem_init(&sync_sem, 0, 1); in bt_hci_cmd_send_sync()
400 cmd(buf)->sync = &sync_sem; in bt_hci_cmd_send_sync()
435 err = k_sem_take(&sync_sem, HCI_CMD_TIMEOUT); in bt_hci_cmd_send_sync()