[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
suspend + delay mechanism?
- To: rtl@rtlinux.org
- Subject: suspend + delay mechanism?
- From: Eric Peterson <ericp@troikanetworks.com>
- Date: Fri, 2 Mar 2001 14:45:39 -0800
- Mail-Followup-To: rtl@rtlinux.org
- User-Agent: Mutt/1.2.5i
Is it possible to do an pthread_suspend_np with a delay in RT-Linux
(3.0)? I'd like to suspend a task, but if he isn't woken up (e.g.
lost the interrupt), I want to pop out of the suspend and poll.
The easiest way I see is to use pthread_wait_np(), in a periodic
task, and use (if possible) pthread_wakeup_np() to awaken it from
the intr handler. But based on the man pages, it isn't explicitly
stated that I can "pthread_wakeup_np" a thread that hasn't used
pthread_suspend_np() to suspend itself.
Yes, I know I could create a "timer task" to do the wakeups, but
unless necessary, I'd rather use the built-in (pthread_make_periodic_np)
functionality. If there's is a better way to do this, I'm all
ears...
One more query: is there a document that generally describes when
one can use the various RT calls, and from what context one can use
Linux kernel routines? Pointers appreciated.
Regards,
Eric
--
The United States is a nation of laws, badly written and randomly enforced.
-- Frank Zappa
Eric Peterson WB6PYK (805)370-3046 mailto:ericp@troikanetworks.com
http://www.troikanetworks.com