Hello,
I'm having two problems concerning the handler for a rtfifo.
I'm using the handler routine to activate threads on certain conditions.
The idea is a periodic threads writes something into the control fifo. The
handler routine checks if a condition is met and then activates a different
thread.
Here a my two problems:
1.) It seems that the fifo routine is not used the first time my thread
writes into the fifo. From the 2nd til n period the handler routine is
reliably activated.
2.) My periodic task writes a number into the fifo which should by idea
read by the fifo handler and then be analyzed and acted upon. But every
time my handler routine tries to read from the fifo the computer is
resetted !!!!
BTW. Communication between a realtime thread and a user space program in
the same module works just fine.
Here a few code snips from my program to help understand the problem I'm in:
void periodic_task (void *t)
{
int msg;
msg=42;
rtf_put(3, &msg, sizeof(msg));
}
int my_handler (int fifo)
{
int msg;
rtf_get(3, &msg, sizeof(msg));
.....
}
init_module()
{
......
rtf_create_rt_handler(3, &my_handler);
}
This is written from memory, so there might be a few spelling mistakes. The
example actually works, except for the tow things mentioned above, when not
using the rtf_get function in my_handler.
If anyone has any idea, what I'm missing, I would be very grateful.
Any help is highly appreciated.
Thanks,
Philip
-- [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/