\sourcecomment{Registering a Driver for Use by Real-Time and
Non-Real-Time Tasks}
\begin{verbatim}
// Linux driver operations
static struct file_operations ln_pd_fops =
{
read: ln_pd_read,
write: ln_pd_write,
... other “magic” functions
};

// RTLinux driver operations
static struct rtl_file_operations rtl_pd_fops = {
     	NULL,
	rtl_pd_read,
	rtl_pd_write,
	... other “magic” functions
};

// register Linux driver...
if (register_chrdev(PD_LN_MAJOR, “pdaq”, &ln_pd_fops)) 
{ handle errors... }
// ...and RTLinux driver
if (rtl_register_chrdev(PD_RT_MAJOR, “pdaq”, &rtl_pd_fops)) 
{ handle errors... }
\end{verbatim}
