[Xenomai] struct rtdm_fd usage in application

Gilles Chanteperdrix gilles.chanteperdrix at xenomai.org
Wed Dec 2 20:11:54 CET 2015


On Wed, Dec 02, 2015 at 06:38:39PM +0000, Heinick, J Michael wrote:
> What file(s) do we have to include in an application that interacts
> with a RTDM driver with a node in the /dev/rtdm directory and needs the
> declaration of the rtdm_fd structure?  Any additional information on,
> and examples of, the usage of the rtdm_fd structure would be appreciated.
> 
> Currently, we have a RTDM driver that installs with insmod, creates the
> node in /dev/rtdm, uninstalls with rmmod, and removes the node from
> /dev/rtdm.  At this early stage this RTDM driver is only a skeleton that
> will log a message with rtdm_printk whenever the read, write, and ioctl
> handlers are called.  From the Xenomai 3.0.1 API documentation it appears
> that an application interacting with this driver through open, close,
> read, write, and ioctl will need to have the declaration of the rtdm_fd
> structure. 

Absolutely not. The open, close, read, write calls are part of the
POSIX API, which does not define a struct rtdm_fd. The file
descriptors are passed as integers.

-- 
					    Gilles.
https://click-hack.org



More information about the Xenomai mailing list