Home
last modified time | relevance | path

Searched refs:events (Results 1 – 25 of 317) sorted by relevance

12345678910>>...13

/Zephyr-latest/kernel/
Devents.c45 uint32_t events; member
54 event->events = 0; in z_impl_k_event_init()
108 if (are_wait_conditions_met(thread->events, event_data->events, in event_walk_op()
131 static uint32_t k_event_post_internal(struct k_event *event, uint32_t events, in k_event_post_internal() argument
142 SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_event, post, event, events, in k_event_post_internal()
145 previous_events = event->events & events_mask; in k_event_post_internal()
146 events = (event->events & ~events_mask) | in k_event_post_internal()
147 (events & events_mask); in k_event_post_internal()
148 event->events = events; in k_event_post_internal()
149 data.events = events; in k_event_post_internal()
[all …]
Dpoll.c112 static inline void add_event(sys_dlist_t *events, struct k_poll_event *event, in add_event() argument
117 pending = (struct k_poll_event *)sys_dlist_peek_tail(events); in add_event()
121 sys_dlist_append(events, &event->_node); in add_event()
125 SYS_DLIST_FOR_EACH_CONTAINER(events, pending, _node) { in add_event()
133 sys_dlist_append(events, &event->_node); in add_event()
217 static inline void clear_event_registrations(struct k_poll_event *events, in clear_event_registrations() argument
222 clear_event_registration(&events[num_events]); in clear_event_registrations()
234 static inline int register_events(struct k_poll_event *events, in register_events() argument
246 if (is_condition_met(&events[ii], &state)) { in register_events()
247 set_event_ready(&events[ii], state); in register_events()
[all …]
/Zephyr-latest/subsys/portability/cmsis_rtos_v2/
Devent_flags.c28 struct cv2_event_flags *events; in osEventFlagsNew() local
38 if (k_mem_slab_alloc(&cv2_event_flags_slab, (void **)&events, K_MSEC(100)) in osEventFlagsNew()
40 memset(events, 0, sizeof(struct cv2_event_flags)); in osEventFlagsNew()
45 k_poll_signal_init(&events->poll_signal); in osEventFlagsNew()
46 k_poll_event_init(&events->poll_event, K_POLL_TYPE_SIGNAL, in osEventFlagsNew()
47 K_POLL_MODE_NOTIFY_ONLY, &events->poll_signal); in osEventFlagsNew()
48 events->signal_results = 0U; in osEventFlagsNew()
51 strncpy(events->name, init_event_flags_attrs.name, in osEventFlagsNew()
52 sizeof(events->name) - 1); in osEventFlagsNew()
54 strncpy(events->name, attr->name, sizeof(events->name) - 1); in osEventFlagsNew()
[all …]
/Zephyr-latest/tests/subsys/modem/modem_cmux_pair/src/
Dmain.c289 uint32_t events; in test_setup() local
304 events = k_event_wait(&cmux_event_dte, EVENT_CMUX_CONNECTED, false, K_MSEC(100)); in test_setup()
305 __ASSERT_NO_MSG((events & EVENT_CMUX_CONNECTED)); in test_setup()
306 events = k_event_wait(&cmux_event_dce, EVENT_CMUX_CONNECTED, false, K_MSEC(100)); in test_setup()
307 __ASSERT_NO_MSG((events & EVENT_CMUX_CONNECTED)); in test_setup()
311 events = k_event_wait(&cmux_event_dte, EVENT_CMUX_DLCI1_OPEN, false, K_MSEC(100)); in test_setup()
312 __ASSERT_NO_MSG((events & EVENT_CMUX_DLCI1_OPEN)); in test_setup()
313 events = k_event_wait(&cmux_event_dce, EVENT_CMUX_DLCI1_OPEN, false, K_MSEC(100)); in test_setup()
314 __ASSERT_NO_MSG((events & EVENT_CMUX_DLCI1_OPEN)); in test_setup()
317 events = k_event_wait(&cmux_event_dte, EVENT_CMUX_DLCI2_OPEN, false, K_MSEC(100)); in test_setup()
[all …]
/Zephyr-latest/tests/kernel/events/event_api/src/
Dtest_event_apis.c34 uint32_t events; in entry_extra1() local
36 events = k_event_wait_all(&sync_event, 0x33, true, K_FOREVER); in entry_extra1()
38 k_event_post(&test_event, events); in entry_extra1()
43 uint32_t events; in entry_extra2() local
45 events = k_event_wait(&sync_event, 0x3300, true, K_FOREVER); in entry_extra2()
47 k_event_post(&test_event, events); in entry_extra2()
74 zassert_true(event.events == 0); in ZTEST()
266 zassert_true(test_event.events == 0x123); in test_reset_on_wait()
279 zassert_true(test_event.events == 0x248); in test_reset_on_wait()
292 zassert_true(test_event.events == 0x248021); in test_reset_on_wait()
[all …]
/Zephyr-latest/tests/net/lib/coap_client/src/
Dstubs.c20 short events; member
26 void set_socket_events(int fd, short events) in set_socket_events() argument
29 my_events[fd] |= events; in set_socket_events()
32 void clear_socket_events(int fd, short events) in clear_socket_events() argument
34 my_events[fd] &= ~events; in clear_socket_events()
39 int events = 0; in z_impl_zvfs_poll() local
43 my_events[fds[i].fd] & (fds[i].events | ZSOCK_POLLERR | ZSOCK_POLLHUP); in z_impl_zvfs_poll()
45 events++; in z_impl_zvfs_poll()
48 if (events == 0) { in z_impl_zvfs_poll()
52 return events; in z_impl_zvfs_poll()
/Zephyr-latest/tests/kernel/events/sys_event/src/
Dmain.c45 uint32_t events; in entry_extra1() local
47 events = k_event_wait_all(&sync_event, 0x33, true, K_FOREVER); in entry_extra1()
49 k_event_post(&test_event, events); in entry_extra1()
54 uint32_t events; in entry_extra2() local
56 events = k_event_wait(&sync_event, 0x3300, true, K_FOREVER); in entry_extra2()
58 k_event_post(&test_event, events); in entry_extra2()
72 zassert_true(init_event.events == 0); in ZTEST()
263 zassert_true(test_event.events == 0x123); in test_reset_on_receive()
276 zassert_true(test_event.events == 0x248); in test_reset_on_receive()
289 zassert_true(test_event.events == 0x248021); in test_reset_on_receive()
[all …]
/Zephyr-latest/tests/subsys/modem/modem_pipelink/src/
Dmain.c25 static atomic_t events; variable
37 atomic_set_bit(&events, TEST_EVENTS_CONNECTED_BIT); in test_pipelink_callback()
41 atomic_set_bit(&events, TEST_EVENTS_DISCONNECTED_BIT); in test_pipelink_callback()
52 atomic_set(&events, 0); in test_reset_events()
84 zassert_true(atomic_test_bit(&events, TEST_EVENTS_CONNECTED_BIT)); in ZTEST()
85 zassert_false(atomic_test_bit(&events, TEST_EVENTS_DISCONNECTED_BIT)); in ZTEST()
88 zassert_false(atomic_test_bit(&events, TEST_EVENTS_CONNECTED_BIT)); in ZTEST()
89 zassert_false(atomic_test_bit(&events, TEST_EVENTS_DISCONNECTED_BIT)); in ZTEST()
91 zassert_false(atomic_test_bit(&events, TEST_EVENTS_CONNECTED_BIT)); in ZTEST()
92 zassert_true(atomic_test_bit(&events, TEST_EVENTS_DISCONNECTED_BIT)); in ZTEST()
[all …]
/Zephyr-latest/doc/kernel/services/synchronization/
Devents.rst6 An :dfn:`event object` is a kernel object that implements traditional events.
17 on an event object until the desired set of events has been delivered to the
18 event object. When new events are delivered to the event object, all threads
23 * A 32-bit value that tracks which events have been delivered to it.
27 Events may be **delivered** by a thread or an ISR. When delivering events, the
28 events may either overwrite the existing set of events or add to them in
29 a bitwise fashion. When overwriting the existing set of events, this is referred
31 posting. Both posting and setting events have the potential to fulfill match
35 Threads may wait on one or more events. They may either wait for all of the
36 requested events, or for any of them. Furthermore, threads making a wait request
[all …]
/Zephyr-latest/tests/kernel/poll/src/
Dtest_poll.c81 struct k_poll_event events[] = { in ZTEST_USER() local
107 zassert_equal(k_poll(events, INT_MAX, K_NO_WAIT), -EINVAL); in ZTEST_USER()
108 zassert_equal(k_poll(events, 4096, K_NO_WAIT), -ENOMEM); in ZTEST_USER()
111 zassert_equal(k_poll(events, 0, K_NO_WAIT), -EAGAIN); in ZTEST_USER()
140 zassert_equal(k_poll(events, ARRAY_SIZE(events), K_NO_WAIT), 0, ""); in ZTEST_USER()
142 zassert_equal(events[0].state, K_POLL_STATE_SEM_AVAILABLE, ""); in ZTEST_USER()
145 zassert_equal(events[1].state, K_POLL_STATE_FIFO_DATA_AVAILABLE, ""); in ZTEST_USER()
151 zassert_equal(events[2].state, K_POLL_STATE_SIGNALED, ""); in ZTEST_USER()
156 zassert_equal(events[3].state, K_POLL_STATE_NOT_READY, ""); in ZTEST_USER()
158 zassert_equal(events[4].state, K_POLL_STATE_MSGQ_DATA_AVAILABLE, ""); in ZTEST_USER()
[all …]
/Zephyr-latest/subsys/net/lib/sockets/
Dsockets_service.c32 struct zsock_pollfd events[CONFIG_ZVFS_POLL_MAX]; member
49 svc->pev[i].event.events = 0; in cleanup_svc_events()
92 zvfs_eventfd_write(ctx.events[0].fd, 1); in z_impl_net_socket_service_register()
133 ctx.events[get_idx(svc) + i] = svc->pev[i].event; in net_socket_service_callback()
194 if ((count + 1) > ARRAY_SIZE(ctx.events)) { in socket_service_thread()
197 count + 1, ARRAY_SIZE(ctx.events)); in socket_service_thread()
218 ctx.events[0].fd = fd; in socket_service_thread()
219 ctx.events[0].events = ZSOCK_POLLIN; in socket_service_thread()
229 ctx.events[get_idx(svc) + j] = svc->pev[j].event; in socket_service_thread()
236 ret = zsock_poll(ctx.events, count + 1, -1); in socket_service_thread()
[all …]
/Zephyr-latest/tests/subsys/modem/modem_cmux/src/
Dmain.c256 uint32_t events; in test_modem_cmux_setup() local
300 events = k_event_wait(&cmux_event, EVENT_CMUX_CONNECTED, false, K_MSEC(100)); in test_modem_cmux_setup()
301 __ASSERT_NO_MSG(events == EVENT_CMUX_CONNECTED); in test_modem_cmux_setup()
307 events = k_event_wait(&cmux_event, EVENT_CMUX_DLCI1_OPEN, false, K_MSEC(100)); in test_modem_cmux_setup()
308 __ASSERT_NO_MSG((events & EVENT_CMUX_DLCI1_OPEN)); in test_modem_cmux_setup()
313 events = k_event_wait(&cmux_event, EVENT_CMUX_DLCI2_OPEN, false, K_MSEC(100)); in test_modem_cmux_setup()
314 __ASSERT_NO_MSG((events & EVENT_CMUX_DLCI2_OPEN)); in test_modem_cmux_setup()
331 uint32_t events; in ZTEST() local
341 events = k_event_test(&cmux_event, EVENT_CMUX_DLCI2_RECEIVE_READY); in ZTEST()
342 zassert_equal(events, EVENT_CMUX_DLCI2_RECEIVE_READY, in ZTEST()
[all …]
/Zephyr-latest/doc/kernel/services/
Dpolling.rst32 **poll events**, one for each condition.
34 All events in the array must be initialized before the array can be polled on.
45 Each event can optionally specify a **tag** to group multiple events together,
55 nature of the kernel. The caller must look at the state of all the poll events
72 The main API is :c:func:`k_poll`, which operates on an array of poll events
77 Poll events can be initialized using either the runtime initializers
84 there to help a user to group similar events together. Being optional, it is
93 struct k_poll_event events[4] = {
112 struct k_poll_event events[4];
115 k_poll_event_init(&events[0],
[all …]
/Zephyr-latest/drivers/stepper/
DKconfig.stepper_event_template5 bool "$(module-str) guarantee non ISR callbacks upon stepper events"
7 Enable the dispatch of stepper generated events via
13 int "$(module-str) maximum number of pending stepper events"
17 The maximum number of stepper events that can be pending before new events
/Zephyr-latest/doc/services/ipc/ipc_service/backends/
Dicbmsg_flows.svg4 …"50" width="120" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
7 …<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or…
10 …; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space:…
23 …"50" width="120" height="60" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
26 …<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or…
29 …; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space:…
42 … cy="57.5" rx="7.5" ry="7.5" fill="rgb(255, 255, 255)" stroke="rgb(0, 0, 0)" pointer-events="all"/>
43 …0 M 40 90 L 55 110" fill="none" stroke="rgb(0, 0, 0)" stroke-miterlimit="10" pointer-events="all"/>
46 …<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or…
49 …; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; white-space:…
[all …]
Dicbmsg_memory.svg4 … <rect x="7" y="120" width="120" height="40" fill="none" stroke="#000000" pointer-events="all"/>
7 …<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or…
10 …; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight:…
21 … <rect x="127" y="120" width="200" height="40" fill="none" stroke="#000000" pointer-events="all"/>
24 …<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or…
27 …; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight:…
38 … <rect x="47" y="220" width="80" height="40" fill="none" stroke="#000000" pointer-events="all"/>
41 …<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or…
44 …; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight:…
55 … <rect x="127" y="220" width="80" height="40" fill="none" stroke="#000000" pointer-events="all"/>
[all …]
Dicbmsg_message.svg4 <rect x="0" y="1" width="80" height="40" fill="none" stroke="#000000" pointer-events="all"/>
7 …<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or…
10 …; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight:…
21 … <rect x="80" y="1" width="80" height="40" fill="none" stroke="#000000" pointer-events="all"/>
24 …<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or…
27 …; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight:…
38 … <rect x="160" y="1" width="80" height="40" fill="none" stroke="#000000" pointer-events="all"/>
41 …<foreignObject pointer-events="none" width="100%" height="100%" requiredFeatures="http://www.w3.or…
44 …; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; pointer-events: all; font-weight:…
55 … <rect x="360" y="1" width="80" height="40" fill="none" stroke="#000000" pointer-events="all"/>
[all …]
/Zephyr-latest/samples/bluetooth/encrypted_advertising/include/
Dcommon.h25 struct k_poll_event events[] = { in await_signal() local
29 k_poll(events, ARRAY_SIZE(events), K_FOREVER); in await_signal()
/Zephyr-latest/doc/safety/images/
Dzephyr-safety-process.svg1events="all"/><path d="M 698 181 L 988 181 L 988 651 L 578 651 L 578 211" fill="none" stroke="rgb(…
DIEC-61508-basis.svg1events="all"/></g></g><g data-cell-id="ubt_klcrSJmbAtkwjw60-36"><g><path d="M 437.45 272.21 L 434.…
/Zephyr-latest/subsys/modem/
Dmodem_pipe.c33 static uint32_t pipe_test_events(struct modem_pipe *pipe, uint32_t events) in pipe_test_events() argument
35 return k_event_test(&pipe->event, events); in pipe_test_events()
39 uint32_t events, in pipe_await_events() argument
42 return k_event_wait(&pipe->event, events, false, timeout); in pipe_await_events()
45 static void pipe_post_events(struct modem_pipe *pipe, uint32_t events) in pipe_post_events() argument
47 k_event_post(&pipe->event, events); in pipe_post_events()
50 static void pipe_clear_events(struct modem_pipe *pipe, uint32_t events) in pipe_clear_events() argument
52 k_event_clear(&pipe->event, events); in pipe_clear_events()
55 static void pipe_set_events(struct modem_pipe *pipe, uint32_t events) in pipe_set_events() argument
57 k_event_set(&pipe->event, events); in pipe_set_events()
/Zephyr-latest/tests/benchmarks/latency_measure/
DREADME.rst23 * Time it takes to send and receive events
24 * Time it takes to wait for events (and context switch)
25 * Time it takes to wake and switch to a thread waiting for events
86events.post.immediate.kernel - Post events (nothing wakes) : …
87events.set.immediate.kernel - Set events (nothing wakes) : …
88events.wait.immediate.kernel - Wait for any events (no ctx switch) : …
89events.wait_all.immediate.kernel - Wait for all events (no ctx switch) : …
90events.wait.blocking.k_to_k - Wait for any events (w/ ctx switch) : …
91events.set.wake+ctx.k_to_k - Set events (w/ ctx switch) : …
92events.wait_all.blocking.k_to_k - Wait for all events (w/ ctx switch) : …
[all …]
/Zephyr-latest/doc/hardware/peripherals/sensor/
Dtriggers.rst7 generated events. Typically sensors allow setting up these events to cause
8 digital line signaling for easy capture by a micro controller. The events can
13 data ready to physical events such as taps or steps.
/Zephyr-latest/doc/services/input/
Dindex.rst6 The input subsystem provides an API for dispatching input events from input
18 state, for example when the events corresponding to multiple axes of a
24 An input device can report input events directly using :c:func:`input_report`
28 Complex devices may use a combination of multiple events, and set the ``sync``
33 to only receive events from a specific device. If there's no actual device
42 callback is only invoked for events from the specific device, otherwise the
43 callback will receive all the events in the system. This is the only type of
49 all the events are added to a queue and executed in a common ``input`` thread.
69 Input devices generating X/Y/Touch events can be used in existing applications
99 - :dtcompatible:`input-keymap`: maps row/col/touch events from a keyboard
[all …]
/Zephyr-latest/tests/net/socket/socketpair/src/
Dpoll.c31 fds[0].events |= ZSOCK_POLLIN; in test_socketpair_poll_timeout_common()
42 fds[0].events |= ZSOCK_POLLOUT; in test_socketpair_poll_timeout_common()
105 fds[0].events |= ZSOCK_POLLIN; in ZTEST_F()
143 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_F()
176 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_USER_F()
188 fds[0].events |= ZSOCK_POLLIN; in ZTEST_USER_F()
196 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_USER_F()
198 fds[1].events |= ZSOCK_POLLIN; in ZTEST_USER_F()
249 fds[0].events |= ZSOCK_POLLIN; in ZTEST_F()
272 fds[0].events |= ZSOCK_POLLOUT; in ZTEST_F()
[all …]

12345678910>>...13