Home
last modified time | relevance | path

Searched refs:cond (Results 1 – 25 of 41) sorted by relevance

12

/Zephyr-latest/subsys/bluetooth/controller/hal/
Ddebug.h12 #define LL_ASSERT(cond) \ argument
13 if (!(cond)) { \
14 BT_ASSERT_PRINT(cond); \
17 #define LL_ASSERT_MSG(cond, fmt, ...) \ argument
18 if (!(cond)) { \
19 BT_ASSERT_PRINT(cond); \
24 #define LL_ASSERT(cond) \ argument
25 BT_ASSERT(cond)
26 #define LL_ASSERT_MSG(cond, fmt, ...) \ argument
27 BT_ASSERT_MSG(cond, fmt, ##__VA_ARGS__)
[all …]
/Zephyr-latest/subsys/testsuite/ztest/include/zephyr/
Dztest_assert.h35 static inline bool z_zassert_(bool cond, const char *file, int line) in z_zassert_() argument
37 if (cond == false) { in z_zassert_()
47 #define z_zassert(cond, default_msg, file, line, func, msg, ...) z_zassert_(cond, file, line) argument
49 static inline bool z_zassume_(bool cond, const char *file, int line) in z_zassume_() argument
51 if (cond == false) { in z_zassume_()
61 #define z_zassume(cond, default_msg, file, line, func, msg, ...) z_zassume_(cond, file, line) argument
63 static inline bool z_zexpect_(bool cond, const char *file, int line) in z_zexpect_() argument
65 if (cond == false) { in z_zexpect_()
75 #define z_zexpect(cond, default_msg, file, line, func, msg, ...) z_zexpect_(cond, file, line) argument
79 static inline bool z_zassert(bool cond, const char *default_msg, const char *file, int line, in z_zassert() argument
[all …]
/Zephyr-latest/lib/libc/common/source/thrd/
Dcnd.c12 int cnd_broadcast(cnd_t *cond) in cnd_broadcast() argument
14 switch (pthread_cond_broadcast(cond)) { in cnd_broadcast()
22 void cnd_destroy(cnd_t *cond) in cnd_destroy() argument
24 (void)pthread_cond_destroy(cond); in cnd_destroy()
27 int cnd_init(cnd_t *cond) in cnd_init() argument
29 switch (pthread_cond_init(cond, NULL)) { in cnd_init()
39 int cnd_signal(cnd_t *cond) in cnd_signal() argument
41 switch (pthread_cond_signal(cond)) { in cnd_signal()
51 int cnd_timedwait(cnd_t *restrict cond, mtx_t *restrict mtx, const struct timespec *restrict ts) in cnd_timedwait() argument
53 switch (pthread_cond_timedwait(cond, mtx, ts)) { in cnd_timedwait()
[all …]
/Zephyr-latest/subsys/bluetooth/common/
Dassert.h22 #define BT_ASSERT(cond) \ argument
24 if (!(cond)) { \
25 BT_ASSERT_PRINT(cond); \
30 #define BT_ASSERT_MSG(cond, fmt, ...) \ argument
32 if (!(cond)) { \
33 BT_ASSERT_PRINT(cond); \
39 #define BT_ASSERT(cond) __ASSERT_NO_MSG(cond) argument
40 #define BT_ASSERT_MSG(cond, msg, ...) __ASSERT(cond, msg, ##__VA_ARGS__) argument
/Zephyr-latest/samples/kernel/condition_variables/simple/
DREADME.rst80 [thread zephyr_app_main] done is 0 which is < 20 so waiting on cond
141 [thread 0] done is now 1. Signalling cond.
142 [thread zephyr_app_main] wake - cond was signalled.
143 [thread zephyr_app_main] done is 1 which is < 20 so waiting on cond
144 [thread 1] done is now 2. Signalling cond.
145 [thread zephyr_app_main] wake - cond was signalled.
146 [thread zephyr_app_main] done is 2 which is < 20 so waiting on cond
147 [thread 2] done is now 3. Signalling cond.
148 [thread zephyr_app_main] wake - cond was signalled.
149 [thread zephyr_app_main] done is 3 which is < 20 so waiting on cond
[all …]
/Zephyr-latest/tests/bsim/bluetooth/mesh/src/
Dmesh_test.h49 #define ASSERT_OK(cond) \ argument
51 int _err = (cond); \
55 #cond " failed with error %d\n", _err); \
59 #define ASSERT_OK_MSG(cond, fmt, ...) \ argument
61 int _err = (cond); \
65 #cond " failed with error %d\n" fmt, _err, \
70 #define ASSERT_TRUE(cond) \ argument
72 if (!(cond)) { \
75 #cond " is false.\n"); \
79 #define ASSERT_TRUE_MSG(cond, fmt, ...) \ argument
[all …]
/Zephyr-latest/tests/posix/common/src/
Dcond.c16 ZTEST(cond, test_cond_resource_exhausted) in ZTEST() argument
40 ZTEST(cond, test_cond_resource_leak) in ZTEST() argument
42 pthread_cond_t cond; in ZTEST() local
45 zassert_ok(pthread_cond_init(&cond, NULL), "failed to init cond %zu", i); in ZTEST()
46 zassert_ok(pthread_cond_destroy(&cond), "failed to destroy cond %zu", i); in ZTEST()
50 ZTEST(cond, test_pthread_condattr) in ZTEST() argument
72 ZTEST_SUITE(cond, NULL, NULL, NULL, NULL, NULL);
/Zephyr-latest/tests/lib/c_lib/thrd/src/
Dcnd.c18 cnd_t cond; member
54 zassert_equal(thrd_error, cnd_wait(&fixture->cond, NULL)); in ZTEST_F()
60 zassert_equal(thrd_error, cnd_timedwait(&fixture->cond, NULL, NULL)); in ZTEST_F()
62 cnd_timedwait(&fixture->cond, NULL, &fixture->time_point)); in ZTEST_F()
63 zassert_equal(thrd_error, cnd_timedwait(&fixture->cond, &fixture->mutex, NULL)); in ZTEST_F()
76 res = cnd_timedwait(&fixture->cond, &fixture->mutex, &time_point); in test_cnd_thread_fn()
78 res = cnd_wait(&fixture->cond, &fixture->mutex); in test_cnd_thread_fn()
83 zassert_equal(thrd_success, cnd_signal(&fixture->cond)); in test_cnd_thread_fn()
105 zassert_equal(thrd_success, cnd_broadcast(&fixture->cond)); in tst_cnd_common()
107 zassert_equal(thrd_success, cnd_signal(&fixture->cond)); in tst_cnd_common()
[all …]
/Zephyr-latest/lib/libc/common/include/
Dthreads.h59 int cnd_init(cnd_t *cond);
60 int cnd_wait(cnd_t *cond, mtx_t *mtx);
61 int cnd_timedwait(cnd_t *ZRESTRICT cond, mtx_t *ZRESTRICT mtx, const struct timespec *ZRESTRICT ts);
62 int cnd_signal(cnd_t *cond);
63 int cnd_broadcast(cnd_t *cond);
64 void cnd_destroy(cnd_t *cond);
/Zephyr-latest/lib/posix/options/
Dcond.c36 static inline size_t to_posix_cond_idx(pthread_cond_t cond) in to_posix_cond_idx() argument
38 return mark_pthread_obj_uninitialized(cond); in to_posix_cond_idx()
41 static struct k_condvar *get_posix_cond(pthread_cond_t cond) in get_posix_cond() argument
44 size_t bit = to_posix_cond_idx(cond); in get_posix_cond()
47 if (!is_pthread_obj_initialized(cond)) { in get_posix_cond()
48 LOG_DBG("Cond is uninitialized (%x)", cond); in get_posix_cond()
54 LOG_DBG("Cond is invalid (%x)", cond); in get_posix_cond()
60 LOG_DBG("Cond claims to be initialized (%x)", cond); in get_posix_cond()
90 static int cond_wait(pthread_cond_t *cond, pthread_mutex_t *mu, k_timeout_t timeout) in cond_wait() argument
97 cv = to_posix_cond(cond); in cond_wait()
Dbarrier.c17 struct k_condvar cond; member
91 err = k_condvar_wait(&bar->cond, &bar->mutex, K_FOREVER); in pthread_barrier_wait()
99 err = k_condvar_signal(&bar->cond); in pthread_barrier_wait()
155 err = k_condvar_broadcast(&bar->cond); in pthread_barrier_destroy()
206 err = k_condvar_init(&posix_barrier_pool[i].cond); in pthread_barrier_pool_init()
/Zephyr-latest/subsys/net/ip/
Dtp_priv.h25 #define tp_assert(cond, fmt, args...) do { \ argument
26 if ((cond) == false) { \
28 __func__, #cond, ## args); \
/Zephyr-latest/lib/os/
Dfdtable.c35 struct k_condvar cond; member
56 .cond = Z_CONDVAR_INITIALIZER(fdtable[0].cond),
63 .cond = Z_CONDVAR_INITIALIZER(fdtable[1].cond),
70 .cond = Z_CONDVAR_INITIALIZER(fdtable[2].cond),
156 ref_cond = (struct k_condvar)Z_CONDVAR_INITIALIZER(fdtable[fd].cond); in fdtable_fd_is_initialized()
157 if (memcmp(&ref_cond, &fdtable[fd].cond, sizeof(ref_cond)) != 0) { in fdtable_fd_is_initialized()
198 struct k_condvar **cond) in zvfs_get_obj_lock_and_cond() argument
214 if (cond) { in zvfs_get_obj_lock_and_cond()
215 *cond = &entry->cond; in zvfs_get_obj_lock_and_cond()
253 k_condvar_init(&fdtable[fd].cond); in zvfs_reserve_fd()
/Zephyr-latest/soc/aspeed/
Daspeed_util.h32 #define reg_read_poll_timeout(map, reg, val, cond, sleep_ms, timeout_ms) \ argument
39 if (cond) { \
/Zephyr-latest/samples/modules/chre/src/
Dmain.cpp13 inline const char *boolToString(bool cond) in boolToString() argument
15 return cond ? "SUCCESS" : "FAIL"; in boolToString()
/Zephyr-latest/lib/os/zvfs/
Dzvfs_eventfd.c178 struct k_condvar *cond = NULL; in zvfs_eventfd_close_op() local
187 err = (int)zvfs_get_obj_lock_and_cond(obj, &zvfs_eventfd_fd_vtable, &lock, &cond); in zvfs_eventfd_close_op()
190 __ASSERT_NO_MSG(cond != NULL); in zvfs_eventfd_close_op()
214 err = k_condvar_broadcast(cond); in zvfs_eventfd_close_op()
308 struct k_condvar *cond = NULL; in zvfs_eventfd_rw_op() local
349 err = (int)zvfs_get_obj_lock_and_cond(obj, &zvfs_eventfd_fd_vtable, &lock, &cond); in zvfs_eventfd_rw_op()
352 __ASSERT_NO_MSG(cond != NULL); in zvfs_eventfd_rw_op()
384 err = k_condvar_wait(cond, lock, K_FOREVER); in zvfs_eventfd_rw_op()
391 err = k_condvar_signal(cond); in zvfs_eventfd_rw_op()
/Zephyr-latest/scripts/west_commands/
Dzephyr_ext_common.py35 def check_force(self, cond, msg): argument
45 if not (cond or self.args.force):
/Zephyr-latest/samples/drivers/soc_flash_nrf/src/
Dmain.c33 #define FLASH_PE_RUNTIME_CHECK(cond) (cond) argument
35 #define FLASH_PE_RUNTIME_CHECK(cond) (true) argument
38 #define FLASH_PE_RUNTIME_CHECK(cond) (false) argument
/Zephyr-latest/include/zephyr/net/
Dnet_core.h68 #define NET_ASSERT(cond, ...) __ASSERT(cond, "" __VA_ARGS__) argument
/Zephyr-latest/doc/_extensions/zephyr/kconfig/
D__init__.py310 for value, cond in node.orig_defaults:
312 if cond is not sc.kconfig.y:
350 for value, cond in node.orig_defaults:
352 if cond is not sc.kconfig.y:
357 for value, cond in node.orig_selects:
359 if cond is not sc.kconfig.y:
364 for value, cond in node.orig_implies:
366 if cond is not sc.kconfig.y:
371 for min, max, cond in node.orig_ranges:
376 if cond is not sc.kconfig.y:
/Zephyr-latest/scripts/kconfig/
Dkconfiglib.py1141 for filename, cond in self.defconfig_list.defaults:
1142 if expr_value(cond):
3501 for value, cond in sym.defaults:
3503 depend_on(sym, cond)
3510 for low, high, cond in sym.ranges:
3513 depend_on(sym, cond)
3536 for _, cond in choice.defaults:
3537 depend_on(choice, cond)
3692 cur.defaults = [(default, self._make_and(cond, dep))
3693 for default, cond in cur.defaults]
[all …]
/Zephyr-latest/drivers/wifi/esp_at/
Desp_socket.c192 if (sock->context->cond.lock) {
193 k_mutex_lock(sock->context->cond.lock, K_FOREVER);
207 if (sock->context->cond.lock) {
208 k_mutex_unlock(sock->context->cond.lock);
/Zephyr-latest/tests/bsim/bluetooth/audio/src/
Dcommon.h77 #define WAIT_FOR_COND(cond) while (!(cond)) { k_sleep(K_MSEC(1)); } argument
/Zephyr-latest/tests/unit/list/
Ddlist.c338 int cond(sys_dnode_t *node, void *data) in cond() function
368 cond, &test_node[2].node); in ZTEST()
411 cond, &test_node[2].node); in ZTEST()
417 cond, &test_node[5].node); in ZTEST()
/Zephyr-latest/subsys/net/lib/sockets/
Dsockets_can.c81 k_condvar_init(&ctx->cond.recv); in zcan_socket()
145 if (ctx->cond.lock) { in zcan_received_cb()
146 (void)k_mutex_lock(ctx->cond.lock, K_FOREVER); in zcan_received_cb()
177 if (ctx->cond.lock) { in zcan_received_cb()
178 k_mutex_unlock(ctx->cond.lock); in zcan_received_cb()
181 k_condvar_signal(&ctx->cond.recv); in zcan_received_cb()

12