[EMAIL PROTECTED] wrote:
> 
> > Does my thread really have to be periodic in order to use
> > pthread_wait_np?
> > I have created a thread that does something when my interrupt routine
> > ends,
> > and it isn't periodic but waits to be killed (woken up) by the isr.  Now
> > i
> > see in the doco's for pthread wait that "the thread was previously
> > marked for execution using pthread_make_periodic_np"  I think this is a
> > mistatement?
> 
> No, it is correct.
>
> 
> A tipical interrupt driven task is like this:
> 
> thread_code()
> {
>         for(;;) {
>                 pthread_suspend_np();   // ISR wakes me up by pthread_kill()
>                                         // or pthread_wakeup_np()
>                 do_something();
>         }
> }

Ok, the reason for the confusion is that pthread_wait_np() does work to
some degree even if the thread is not periodic. Yes i failed to RTFM.
the thing that i don't like about the doco on pthread_suspend_np() is
that it says the thread may not block right away, which causes me some
FUD.

Another problem has occurred to me. Is it ok to pthread_kill(wakeup) a
thread that isn't suspended?
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