On Thu, 7 Sep 2000, technique wrote:
> one is a fifo handler which
> i have initialized to wake up on data reception on RT fifo. But it seems to
> do not work properly,
> because my fifo handler does not wake up, and my RT fifo is full after two
> interruptions.
I think that FIFOs are for communication kernel/user space. Why don't you
implement the sorting algorithm in user space as a normal process? Does it
need to react to incoming data in real time?
As I understand, you want handler_sort to be called AFTER handler_int
returns. If not, why don't you just call handler_sort from handler_int - you
would not need any FIFO, just a circular buffer?
Or if you need a fast interrupt handler, and then some "bottom half
ISR" mechanism, you can put data into buffer in handler_int, and wake up
sort_thread with pthread_kill(sort_thread,RTL_SIG_WAKEUP);
sort_thread_func(...)
{
while(1) {
pthread_wait_np();
sort_data...;
}
}
One problem which could occur here is that even RT IRQ could have lower
priority then your sort_thread and the wakeup could occur immediately
(Victor, am I right, and if so how to avoid this - how to rise the priority
of RT ISR?)
> I wonder if this kind of RT tasks synchronisation (by the means of RT fifos)
> is possible ?
> If not, which kind if IPC method do i have to use ?
I think semaphores would be very helpful to you as well.
Best regards,
--
Tomek
-- [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/