Lines Matching full:sys_sem
10 * @brief public sys_sem APIs.
17 * sys_sem exists in user memory working as counter semaphore for
19 * enabled, sys_sem behaves like k_sem.
33 * sys_sem structure
35 struct sys_sem { struct
51 * @brief Statically define and initialize a sys_sem argument
55 * @code extern struct sys_sem <name>; @endcode
65 struct sys_sem _name = { \
76 STRUCT_SECTION_ITERABLE_ALTERNATE(k_sem, sys_sem, _name) = { \
97 int sys_sem_init(struct sys_sem *sem, unsigned int initial_count,
113 int sys_sem_give(struct sys_sem *sem);
116 * @brief Take a sys_sem.
120 * @param sem Address of the sys_sem.
121 * @param timeout Waiting period to take the sys_sem,
124 * @retval 0 sys_sem taken.
129 int sys_sem_take(struct sys_sem *sem, k_timeout_t timeout);
132 * @brief Get sys_sem's value
136 * @param sem Address of the sys_sem.
138 * @return Current value of sys_sem.
140 unsigned int sys_sem_count_get(struct sys_sem *sem);
170 * @brief Guards a code block with the given sys_sem, automatically acquiring
205 * @param sem Semaphore (@ref sys_sem) used to guard the enclosed code block.