forcing a thread to run

From: dnewbold (dnewbold_at_generalstandards.com)
Date: 09/14/04


Date: Tue, 14 Sep 2004 12:01:21 -0500

I'm writing a shared library for a device interface. When an application
opens a device the library creates a number of support threads. When an
application closes a device the library closes down the support threads.

One of the support threads, however, is blocked in the driver by
interruptible_sleep_on_timeout() with a long timeout period. The cause of
interruptible_sleep_on_timeout() returning (either by a timeout or by the
ISR) has no affect other than to resume the thread -- no negative side
affects at all. What is an appropriate means that a user land process can
use to force the thread to run, thereby letting the driver's
interruptible_sleep_on_timeout() call return? I've tried a number of signals
via pthread_kill(), but most produce immediate, unacceptable results.
SIGCONT seems to work as desired, but I'm not sure that this is appropriate
and I'm not sure that there aren't other as yet seen negative affects of
doing this.

Can anyone help?

Don

Please respond to: dnewbold@generalstandards.com