Lines Matching full:pipe
6 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
37 Data is synchronously **received** from a pipe by a thread. If the specified
41 data is either copied from the pipe's ring buffer or directly from the
44 Data may also be **flushed** from a pipe by a thread. Flushing can be performed
45 either on the entire pipe or on only its ring buffer. Flushing the entire pipe
57 The kernel does allow for an ISR to flush a pipe from an ISR. It also
64 A pipe is defined using a variable of type :c:struct:`k_pipe` and an
68 The following code defines and initializes an empty pipe that has a ring
79 Alternatively, a pipe can be defined and initialized at compile time by
83 that macro defines both the pipe and its ring buffer.
89 Writing to a Pipe
92 Data is added to a pipe by calling :c:func:`k_pipe_put`.
94 The following code builds on the example above, and uses the pipe to pass
95 data from a producing thread to one or more consuming threads. If the pipe's
114 /* Craft message to send in the pipe */
135 Reading from a Pipe
138 Data is read from the pipe by calling :c:func:`k_pipe_get`.
140 The following code builds on the example above, and uses the pipe to
168 Use a pipe to send streams of data between threads.
171 A pipe can be used to transfer long streams of data if desired. However
175 Flushing a Pipe's Buffer
178 Data is flushed from the pipe's ring buffer by calling
181 The following code builds on the examples above, and flushes the pipe's
190 /* Pipe buffer contains stale data. Flush it. */
196 Flushing a Pipe
199 All data in the pipe is flushed by calling :c:func:`k_pipe_flush`.
202 data in the pipe.
210 /* Critical error detected. Flush the entire pipe to reset it. */
220 Use a pipe to send streams of data between threads.
223 A pipe can be used to transfer long streams of data if desired. However it