Adi Sudewa wrote:
> 
> Hi all,
> 
> In my application, I build a kind of real-time server that handle requests
> from serial port. I use rt_com_read() function from rt_com package.
> 
> The current implementation of rt_com_read() is non-blocking and return
> immediately when no data available at serial port. So, my task must
> periodically check if any data available.
> 
> I wonder if I can use interrupt that notify my task to continue only if
> data available at serial port, and still use rt_com_read() to read data.
> Is it possible to do this ? Have anyone do this before ?


I have a similar application which i am going to have to get working by
next
week or never show my face around here again:)  My plan is as follows: 
There is
a fake interrupt routine in the rt_com package that then calls the real
interrupt 
routine.  I plan to modify the fake interrupt routine to wake up my
thread when
more data appears.  Thus instead of doing a blocking read, i will just
do a wait
in my thread when i want more data and then
pthread_kill(thread_to_wakeup,RTL_SIGNAL_WAKEUP).
Then you can call rt_com_read() from the thread.

As i'm writing this i realize i am in trouble:)
eric
-- [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