Hi there!
Sorry for the confusion.
This is what I currently have and what used to work for Beta11
(substitute both pthread_wait_np and pthread_suspend_np with their
appropriate APIv1 counterparts):
/* begin main loop. */
while (1)
{
/* this is the periodic part of my task */
while (ok_to_run)
{
pthread_wait_np();
...
}
pthread_suspend_np(pthread_self());
}
So, what happens here is that this runs for a while until the value of
"ok_to_run" is set to False. At that point this task should just
become dormant and will continue to do so until the user wants to run
the periodic task again at which time I call
"pthread_wakeup_np(task[2])" from some handler.
The problem that I am having is that the task does not suspend itself
when I call pthread_suspend_np, but rather continues to call the task
at the periodic rate.
Here is the last variant that I tried last night in attempts to suspend the task
appropriately:
pthread_make_periodic(pthread_self(),0,0);
pthread_suspend_np(pthread_self());
This surprisingly worked, although after two or three attempts, the
computer froze.
I will attempt using Dr. Yodaiken's suggestion. Stay tuned...
-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/