rtf_put2
Write data to a real-time fifo
Usage
#define MODULE #include <linux/module.h> #include <linux/kernel.h> #include <linux/version.h> #include <linux/errno.h> #include <linux/rtf.h>
int rtf_put(unsigned int fifo, char * buf, int count);
Overview
rtf_put writes a block of data to a real-time fifo (RT-FIFO) previously created with a call to rtf_create(2). fifo is the ID with which the RT-FIFO was created. buf is the block of data to be written, while count is the size of the block in bytes. This mechanism is available only to real-time tasks; Linux processes use a write (2) to the corresponding fifo device to enqueue data to a fifo. Similarly, Linux processes use read (2) or similar functions to read the data previously written via rtf_put by a real-time task.
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(2), write(2), and select(2).
Return value
On success, size is returned. On failure, -1 is returned, and errno is set as described below.
Errors
|
fifo is greater than or equal to RTF_NO. |
|---|---|
|
fifo is not a valid RT-FIFO identifier. |
|
insufficient space is available in the RT-FIFO for count bytes. |
Releases
Unchanged in 2 releases since Debian 2.2 (Potato).