man rtf_make_user_pair () - make a pair of RT-FIFOs act like a bidirectional FIFO

NAME

rtf_make_user_pair - make a pair of RT-FIFOs act like a bidirectional FIFO

SYNOPSIS

#include <rtl_fifo.h> 
 
int rtf_make_user_pair(unsigned int N, unsigned int P);       

DESCRIPTION

rtf_make_user_pair modifies the behaviour of the RT-FIFO N: user-space reads of the /dev/rtfN are now routed to RT-FIFO P. User-space writes to /dev/rtfN continue communicating with fifo N. This essentially makes /dev/rtfN bidirectional: data sent with rtf_put to FIFO P will be read from /dev/rtfN; rtf_get on FIFO N gets data written to /dev/rtfN. RT-FIFO handlers are affected similarly.

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

This function returns 0 on success and a negative error code on error.

ERRORS

-ENODEV
N or P is greater than or equal to RTF_NO.
-EINVAL
N or P is not a valid RT-FIFO identifier.

NOTES

This function is useful when implementing Linux character device drivers on top of RT-FIFOs.

SEE ALSO

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) , rtf_link_user_ioctl(3) (link to URL rtf_link_user_ioctl.3.html) , write(2) (link to URL ../susv2/xns/write.html)

©2001 FSMLabs Inc.

All rights reserved.