rtf_create3
Create a real-time fifo
Usage
#include <rtl_fifo.h>
int rtf_create(unsigned int fifo, int size);
Overview
rtf_create creates a real-time fifo (RT-FIFO) of size size and assigns it the identifier fifo. fifo is a value unique within the system, and must be less than RTF_NO.
The RT-FIFO is a mechanism, implemented as a character device, to communicate between real-time tasks and ordinary Linux processes. The rtf_* functions are used by the real-time tasks; Linux processes use standard character device access functions such as read(3), write(3), and select(3).
Return value
On success, 0 is returned. On failure, a negative value is returned as described below.
Errors
|
fifo is greater than or equal to RTF_NO. |
|---|---|
|
fifo is already in use. Choose a different ID. |
|
size bytes could not be allocated for the RT-FIFO. |
Notes
This function can only be called in the Linux kernel mode.