On Fri, Nov 19, 1999 at 12:07:14AM -0500, Edgar F. Hilton wrote:
> 
> I guess the question should really read:
> 
> how do I stop periodic tasks???


The way it should work:
        pthread_suspend suspends the task until a pthread_wakeup
        pthread_wait suspends the task until its next period. 

"Note: the thread is not guaranteed to be suspended immediately."

pthread_suspend_np(P) informs the scheduler for P that P should not
be selected. If P is currently running, suspend has no effect until P
calls the scheduler.  That is, if pthread_suspend is called  from an
interrupt handler while P is the active thread or if P is running
on a second processor, then suspend will do nothing until P calls
the scheduler.

So
        pthread_suspend(pthread_self())
        rtl_schedule();

should do the trick.  If not, please tell me. 

It does seem a little clumsy, but we wanted to allow for calls to 
suspend during interrupts and  I'm hesitant about  calls
to  rtl_schedule during interrupts.   The API is not frozen, however,
and I'm curious about what people think is good and bad as they
build programs (The API is not frozen, but as of 2.0 we will not
break backward compatability unless we really have to and I
can't think of what circumstances would force that).



> 
> -Edgar
> --- [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/
--- [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