man rtf_put () - write data to a realtime fifo
NAME
rtf_put - write data to a realtime fifo
SYNOPSIS
#include <rtl_fifo.h> int rtf_put(unsigned int fifo, char * buf, int count);
DESCRIPTION
rtf_put writes a block of data to a realtime fifo (RT-FIFO) previously created with a call to rtf_create(3). fifo is the ID with which the RT-FIFO was created. buf is the block of data to be filled with the received bytes, while count is the size of the block in bytes. This mechanism is available only to realtime 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 realtime task.
The RT-FIFO is a mechanism, implemented as a character device, to communicate between realtime tasks and ordinary Linux processes. The rtf_* functions are used by the realtime tasks; Linux processes use standard character device access functions such as read(2), write(2) and select(2).
RETURN VALUE
On success, count is returned. On failure, a negative value is returned as described below.
ERRORS
- -ENODEV
- fifo is greater than or equal to RTF_NO.
- -EINVAL
- fifo is not a valid RT-FIFO identifier.
- -ENOSPC
- insufficient space is available in the RT-FIFO for count bytes.
Notes
rtf_put is available in PSC, the user-level real-time signal library. It can be called from handlers installed via rtlinux_sigaction(3) (link to URL rtlinux_sigaction.3.html) .
SEE ALSO
UNIX spec read(2) (link to URL ../susv2/xns/read.html) , rtf_create(3) (link to URL rtf_create.3.html) , rtf_create_handler(3) (link to URL rtf_create_handler.3.html) , rtf_destroy(3) (link to URL rtf_destroy.3.html) , rtf_get(3) (link to URL rtf_get.3.html) , UNIX spec write(2) (link to URL ../susv2/xns/write.html)
©1997 Jerry Epplin.
Modifications for RTLinux 2.x and 3.x by Michael Barabanov. ©2001 FSMLabs Inc.
All rights reserved.