is it ok to use in kernel module (non-rt) the following for writing/reading fifos (to 
comunicate with rt task) ?

// ...
  struct msg rt_msg;
  rtf_create(FIFO, sizeof(rt_msg));

  rt_msg.cmd=1;
  if ( rtf_put(FIFO, &rt_msg, sizeof(rt_msg)) != sizeof(rt_msg) ) {
    printk("FIFO_CTL write failed, terminating\n");
    return(-EINVAL);
  }

  if( rtf_get(FIFO, &rt_msg, sizeof(rt_msg)) != sizeof(rt_msg) ){
    printk("FIFO read failed, terminating\n");
    return(-EINVAL);
  }
  printk("got from rttsak: %d\n", rt_msg.cmd);
// ...

rgds, 
Denis.
                                    
-- 
  ("\''/").__..-''"`-. .         [EMAIL PROTECTED]
  `9_ 9  )   `-. (    ).`-._.`)  http://www.lut.fi/~karpov/
  (_Y_.)' ._   ) `._`.  " -.-'   +358 (0)40 502 0931
   _..`-'_..-_/ /-'_.'           Lappeenranta University of Technology
 (l)-'' ((i).' ((!.'             
  *** Born free...Taxed to death.  ***
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
---
For more information on Real-Time Linux see:
http://www.rtlinux.org/rtlinux/

Reply via email to