rtf_create_handler installs a handler which is executed when data is written to or read from a real-time fifo (RT-FIFO) by a user-space process. fifo is an RT-FIFO that must have previously been created with a call to rtf_create. handler is then called whenever a Linux process accesses that fifo.
rtf_create_handler is often used in conjunction with rtf_get to process data acquired asynchronously from a Linux process. The installed handler calls rtf_get when data is present. Because the handler is only executed when there is activity on the fifo, polling is not necessary.
The RT-FIFO is a mechanism, implemented as a character device, to communicate between realtime software components (either in threads or handlers), and between realtime software and ordinary Linux processes. The rtf_* functions are used in RT mode; Linux processes use standard character device access functions such as read(2), write(2) and select(2).
The handler is only called when a Linux process accesses the FIFO. To install a handler that would be called on rtf_put or rtf_get, use rtf_create_rt_handler.
fifo is greater than or equal to RTF_NO, or is not a valid RT-FIFO identifier; or handler is NULL.
©1997 Jerry Epplin.
Modifications for RTLinux 2.x and 3.x by Michael Barabanov. ©2001 FSMLabs Inc.
All rights reserved.