Home
last modified time | relevance | path

Searched full:pipe (Results 1 – 25 of 201) sorted by relevance

123456789

/Zephyr-latest/subsys/modem/
Dmodem_pipe.c7 #include <zephyr/modem/pipe.h>
14 static void pipe_set_callback(struct modem_pipe *pipe, in pipe_set_callback() argument
18 K_SPINLOCK(&pipe->spinlock) { in pipe_set_callback()
19 pipe->callback = callback; in pipe_set_callback()
20 pipe->user_data = user_data; in pipe_set_callback()
24 static void pipe_call_callback(struct modem_pipe *pipe, enum modem_pipe_event event) in pipe_call_callback() argument
26 K_SPINLOCK(&pipe->spinlock) { in pipe_call_callback()
27 if (pipe->callback != NULL) { in pipe_call_callback()
28 pipe->callback(pipe, event, pipe->user_data); in pipe_call_callback()
33 static uint32_t pipe_test_events(struct modem_pipe *pipe, uint32_t events) in pipe_test_events() argument
[all …]
Dmodem_pipelink.c41 return link->pipe; in modem_pipelink_get_pipe()
52 void modem_pipelink_init(struct modem_pipelink *link, struct modem_pipe *pipe) in modem_pipelink_init() argument
54 link->pipe = pipe; in modem_pipelink_init()
Dmodem_ubx.c117 if (ubx->pipe == NULL) { in modem_ubx_run_script_helper()
179 static void modem_ubx_pipe_callback(struct modem_pipe *pipe, enum modem_pipe_event event, in modem_ubx_pipe_callback() argument
195 ret = modem_pipe_transmit(ubx->pipe, (const uint8_t *) ubx->script->request, tx_frame_len); in modem_ubx_send_handler()
267 ret = modem_pipe_receive(ubx->pipe, ubx->receive_buf, ubx->receive_buf_size); in modem_ubx_process_handler()
284 int modem_ubx_attach(struct modem_ubx *ubx, struct modem_pipe *pipe) in modem_ubx_attach() argument
290 ubx->pipe = pipe; in modem_ubx_attach()
291 modem_pipe_attach(ubx->pipe, modem_ubx_pipe_callback, ubx); in modem_ubx_attach()
305 modem_pipe_release(ubx->pipe); in modem_ubx_release()
312 ubx->pipe = NULL; in modem_ubx_release()
332 ubx->pipe = NULL; in modem_ubx_init()
/Zephyr-latest/include/zephyr/modem/
Dpipe.h18 * @brief Modem Pipe
19 * @defgroup modem_pipe Modem Pipe
24 /** Modem pipe event */
42 typedef void (*modem_pipe_api_callback)(struct modem_pipe *pipe, enum modem_pipe_event event,
74 * @brief Initialize a modem pipe
76 * @param pipe Pipe instance to initialize
77 * @param data Pipe data to bind to pipe instance
78 * @param api Pipe API implementation to bind to pipe instance
80 void modem_pipe_init(struct modem_pipe *pipe, void *data, const struct modem_pipe_api *api);
87 * @brief Open pipe
[all …]
Dcmux.h27 #include <zephyr/modem/pipe.h>
89 /* Pipe */
90 struct modem_pipe pipe; member
128 /* Bus pipe */
129 struct modem_pipe *pipe; member
216 /** Receive buffer used by pipe */
218 /** Size of receive buffer used by pipe [127, ...] */
233 * @brief Attach CMUX instance to pipe
236 * @param pipe Pipe instance to attach CMUX instance to
238 int modem_cmux_attach(struct modem_cmux *cmux, struct modem_pipe *pipe);
[all …]
Dpipelink.h7 #include <zephyr/modem/pipe.h>
27 /** Modem pipe has been connected and can be opened */
29 /** Modem pipe has been disconnected and can't be opened */
54 struct modem_pipe *pipe; member
74 * @brief Check whether pipelink pipe is connected
76 * @retval true if pipe is connected
77 * @retval false if pipe is not connected
82 * @brief Get pipe from pipelink
84 * @retval Pointer to pipe if pipelink has been initialized
98 void modem_pipelink_init(struct modem_pipelink *link, struct modem_pipe *pipe);
[all …]
Dubx.h11 #include <zephyr/modem/pipe.h>
82 struct modem_pipe *pipe; member
100 * @brief Attach pipe to Modem Ubx
103 * @param pipe Pipe instance to attach Modem Ubx instance to
108 int modem_ubx_attach(struct modem_ubx *ubx, struct modem_pipe *pipe);
111 * @brief Release pipe from Modem Ubx instance
121 * @note Modem Ubx instance must be attached to a pipe instance
147 * @note Modem Ubx instance must be attached to a pipe instance
Dppp.h14 #include <zephyr/modem/pipe.h>
89 /* Wrapped PPP frames are sent and received through this pipe */
90 struct modem_pipe *pipe; member
129 * @brief Attach pipe to instance and connect
132 * @param pipe Pipe to attach to modem PPP instance
134 int modem_ppp_attach(struct modem_ppp *ppp, struct modem_pipe *pipe);
145 * @brief Release pipe from instance
/Zephyr-latest/kernel/
Dpipes.c30 static int pipe_get_internal(k_spinlock_key_t key, struct k_pipe *pipe,
39 void k_pipe_init(struct k_pipe *pipe, unsigned char *buffer, size_t size) in k_pipe_init() argument
41 pipe->buffer = buffer; in k_pipe_init()
42 pipe->size = size; in k_pipe_init()
43 pipe->bytes_used = 0U; in k_pipe_init()
44 pipe->read_index = 0U; in k_pipe_init()
45 pipe->write_index = 0U; in k_pipe_init()
46 pipe->lock = (struct k_spinlock){}; in k_pipe_init()
47 z_waitq_init(&pipe->wait_q.writers); in k_pipe_init()
48 z_waitq_init(&pipe->wait_q.readers); in k_pipe_init()
[all …]
/Zephyr-latest/doc/kernel/services/data_passing/
Dpipes.rst6 A :dfn:`pipe` is a kernel object that allows a thread to send a byte stream
17 The pipe can be configured with a ring buffer which holds data that has been
18 sent but not yet received; alternatively, the pipe may have no ring buffer.
20 Any number of pipes can be defined (limited only by available RAM). Each pipe is
23 A pipe has the following key property:
25 * A **size** that indicates the size of the pipe's ring buffer. Note that a
26 size of zero defines a pipe with no ring buffer.
28 A pipe must be initialized before it can be used. The pipe is initially empty.
30 Data is synchronously **sent** either in whole or in part to a pipe by a
34 completed later. Accepted data is either copied to the pipe's ring buffer
[all …]
/Zephyr-latest/tests/benchmarks/app_kernel/src/
Dpipe_r.c15 int pipeget(struct k_pipe *pipe, enum pipe_options option,
32 int pipe; in piperecvtask() local
39 for (pipe = 0; pipe < 3; pipe++) { in piperecvtask()
41 pipeget(test_pipes[pipe], _ALL_N, getsize, in piperecvtask()
55 for (pipe = 0; pipe < 3; pipe++) { in piperecvtask()
57 pipeget(test_pipes[pipe], _1_TO_N, in piperecvtask()
72 * @brief Read a data portion from the pipe and measure time
76 * @param pipe Pipe to read data from.
82 int pipeget(struct k_pipe *pipe, enum pipe_options option, int size, int count, in pipeget() argument
100 ret = k_pipe_get(pipe, data_recv, size2xfer, in pipeget()
Dpipe_b.c47 int pipeput(struct k_pipe *pipe, enum pipe_options
63 int pipe; in pipe_test() local
79 PRINT_STRING("| Send data into a pipe towards a " in pipe_test()
93 for (pipe = 0; pipe < 3; pipe++) { in pipe_test()
95 pipeput(test_pipes[pipe], _ALL_N, putsize, putcount, in pipe_test()
96 &puttime[pipe]); in pipe_test()
128 for (pipe = 0; pipe < 3; pipe++) { in pipe_test()
129 pipeput(test_pipes[pipe], _1_TO_N, putsize, in pipe_test()
130 putcount, &puttime[pipe]); in pipe_test()
145 * @brief Write a data portion to the pipe and measure time
[all …]
/Zephyr-latest/tests/kernel/pipe/pipe_api/src/
Dtest_pipe_avail.c8 * @brief Tests for the Pipe read / write availability
16 static struct k_pipe pipe = { variable
40 * simultaneously return 0 for a buffered pipe, but they will both return 0
41 * for an unbuffered pipe.
73 * As shown above, the pipe will be able to read 3 bytes without blocking
88 pipe.read_index = 0; in ZTEST()
89 pipe.write_index = 3; in ZTEST()
90 /* pipe.bytes_used is irrelevant */ in ZTEST()
92 r_avail = k_pipe_read_avail(&pipe); in ZTEST()
95 w_avail = k_pipe_write_avail(&pipe); in ZTEST()
[all …]
Dtest_pipe_contexts.c26 struct k_pipe pipe, pipe1; variable
52 /**TESTPOINT: pipe put*/ in tpipe_put()
66 /*get pipe data from "pipe_put"*/ in tpipe_get()
68 /**TESTPOINT: pipe get*/ in tpipe_get()
91 /**TESTPOINT: thread-thread data passing via pipe*/ in tpipe_thread_thread()
109 /**TESTPOINT: thread-thread data passing via pipe*/ in tpipe_kthread_to_kthread()
129 /**TESTPOINT: pipe put*/ in tpipe_put_no_wait()
143 /**TESTPOINT: pipe put*/ in tpipe_put_small_size()
156 /*get pipe data from "pipe_put"*/ in tpipe_get_small_size()
158 /**TESTPOINT: pipe get*/ in tpipe_get_small_size()
[all …]
Dtest_pipe_fail.c23 /**TESTPOINT: pipe put returns -EIO*/ in put_fail()
27 /**TESTPOINT: pipe put returns -EAGAIN*/ in put_fail()
37 * @brief Test pipe put failure scenario
48 * @brief Test pipe put by a user thread
59 /* check the number of bytes that may be read from pipe. */ in ZTEST_USER()
61 /* check the number of bytes that may be written to pipe.*/ in ZTEST_USER()
73 /**TESTPOINT: pipe put returns -EIO*/ in get_fail()
77 /**TESTPOINT: pipe put returns -EAGAIN*/ in get_fail()
86 * @brief Test pipe get failure scenario
102 * @brief Test pipe get by a user thread
[all …]
/Zephyr-latest/scripts/pylib/twister/twisterlib/
Djobserver.py82 self._internal_pipe = os.pipe()
114 and W will be the read and write file descriptors to the pipe
140 pipe = [int(x) for x in match.groups()]
142 pipe = None
149 if pipe:
150 rc = fcntl.fcntl(pipe[0], fcntl.F_GETFL)
153 f"FD {pipe[0]} is not readable (flags={rc:x});"
156 pipe = None
157 if pipe:
158 rc = fcntl.fcntl(pipe[1], fcntl.F_GETFL)
[all …]
/Zephyr-latest/tests/kernel/pipe/pipe/src/
Dtest_pipe.c36 /* the pipe will always pass */
39 /* Pipe will at least put one byte */
42 /* Pipe must put all data on the buffer */
302 /* 1. fill the pipe. */ in pipe_put_forever_wait()
381 /*3. last read to clear the pipe */ in pipe_get_forever_wait()
406 /* 1. fill the pipe. */ in pipe_put_timeout()
420 /* pipe put cant be satisfied and thus timeout */ in pipe_put_timeout()
433 /* Try once more with 1 byte pipe put cant be satisfied and in pipe_put_timeout()
512 /* cleanup the pipe */ in pipe_get_timeout()
692 * @brief Verify pipe with 1 element insert.
[all …]
/Zephyr-latest/tests/subsys/modem/modem_pipe/src/
Dmain.c11 #include <zephyr/modem/pipe.h>
27 struct modem_pipe pipe; member
52 modem_pipe_notify_opened(&backend->pipe); in modem_backend_fake_opened_handler()
62 modem_pipe_notify_opened(&backend->pipe); in modem_backend_fake_open()
76 modem_pipe_notify_transmit_idle(&backend->pipe); in modem_backend_fake_transmit_idle_handler()
88 modem_pipe_notify_transmit_idle(&backend->pipe); in modem_backend_fake_transmit()
112 modem_pipe_notify_closed(&backend->pipe); in modem_backend_fake_closed_handler()
122 modem_pipe_notify_closed(&backend->pipe); in modem_backend_fake_close()
146 modem_pipe_init(&backend->pipe, backend, &modem_backend_fake_api); in modem_backend_fake_init()
147 return &backend->pipe; in modem_backend_fake_init()
[all …]
/Zephyr-latest/tests/ztest/fail/src/
Dmain.cpp20 auto pipe = popen(FAIL_TARGET_BINARY, "r"); in ZTEST() local
22 zassert_not_null(pipe, "Failed to execute '" FAIL_TARGET_BINARY "'"); in ZTEST()
25 while (!feof(pipe)) { in ZTEST()
26 if (fgets(buffer, ARRAY_SIZE(buffer), pipe) != nullptr) { in ZTEST()
51 auto rc = WEXITSTATUS(pclose(pipe)); in ZTEST()
/Zephyr-latest/subsys/modem/backends/
Dmodem_backend_uart.c19 modem_pipe_notify_receive_ready(&backend->pipe); in modem_backend_uart_receive_ready_handler()
27 modem_pipe_notify_transmit_idle(&backend->pipe); in modem_backend_uart_transmit_idle_handler()
49 return &backend->pipe; in modem_backend_uart_init()
56 return &backend->pipe; in modem_backend_uart_init()
Dmodem_backend_tty.c45 modem_pipe_notify_receive_ready(&backend->pipe); in modem_backend_tty_routine()
69 modem_pipe_notify_opened(&backend->pipe); in modem_backend_tty_open()
79 modem_pipe_notify_transmit_idle(&backend->pipe); in modem_backend_tty_transmit()
102 modem_pipe_notify_closed(&backend->pipe); in modem_backend_tty_close()
125 modem_pipe_init(&backend->pipe, backend, &modem_backend_tty_api); in modem_backend_tty_init()
126 return &backend->pipe; in modem_backend_tty_init()
/Zephyr-latest/subsys/tracing/test/
Dtracing_test.h345 #define sys_port_trace_k_pipe_init(pipe) sys_trace_k_pipe_init(pipe, buffer, size) argument
346 #define sys_port_trace_k_pipe_cleanup_enter(pipe) sys_trace_k_pipe_cleanup_enter(pipe) argument
347 #define sys_port_trace_k_pipe_cleanup_exit(pipe, ret) sys_trace_k_pipe_cleanup_exit(pipe, ret) argument
348 #define sys_port_trace_k_pipe_alloc_init_enter(pipe) sys_trace_k_pipe_alloc_init_enter(pipe, size) argument
349 #define sys_port_trace_k_pipe_alloc_init_exit(pipe, ret) \ argument
350 sys_trace_k_pipe_alloc_init_exit(pipe, size, ret)
351 #define sys_port_trace_k_pipe_flush_enter(pipe) \ argument
352 sys_trace_k_pipe_flush_enter(pipe)
353 #define sys_port_trace_k_pipe_flush_exit(pipe) \ argument
354 sys_trace_k_pipe_flush_exit(pipe)
[all …]
/Zephyr-latest/dts/bindings/ieee802154/
Dzephyr,ieee802154-uart-pipe.yaml4 description: UART PIPE fake radio device (used in QEMU)
6 compatible: "zephyr,ieee802154-uart-pipe"
/Zephyr-latest/tests/subsys/modem/mock/
Dmodem_backend_mock.c15 modem_pipe_notify_opened(&mock->pipe); in modem_backend_mock_open()
79 modem_pipe_notify_closed(&mock->pipe); in modem_backend_mock_close()
95 modem_pipe_notify_receive_ready(&mock->pipe); in modem_backend_mock_receive_ready_handler()
103 modem_pipe_notify_transmit_idle(&mock->pipe); in modem_backend_mock_transmit_idle_handler()
116 modem_pipe_init(&mock->pipe, mock, &modem_backend_mock_api); in modem_backend_mock_init()
117 return &mock->pipe; in modem_backend_mock_init()
122 return &mock->pipe; in modem_backend_mock_get_pipe()
/Zephyr-latest/include/zephyr/tracing/
Dtracing.h1553 * @brief Pipe Tracing APIs
1554 * @defgroup subsys_tracing_apis_pipe Pipe Tracing APIs
1559 * @brief Trace initialization of Pipe
1560 * @param pipe Pipe object
1562 #define sys_port_trace_k_pipe_init(pipe) argument
1565 * @brief Trace Pipe cleanup entry
1566 * @param pipe Pipe object
1568 #define sys_port_trace_k_pipe_cleanup_enter(pipe) argument
1571 * @brief Trace Pipe cleanup exit
1572 * @param pipe Pipe object
[all …]

123456789