Wakes one thread that is waiting on the specified condition variable (called from interrupt level only).
1 – C Binding
#include <pthread.h> int pthread_cond_signal_int_np( pthread_cond_t *cond);
2 – Arguments
cond Condition variable to be signaled.
3 – Description
This routine wakes one thread waiting on the specified condition variable. It can only be called from a software interrupt handler routine (such as from a Tru64 UNIX signal handler or OpenVMS AST). Calling this routine implies that it might be possible for a single waiting thread to proceed. The scheduling policies of the waiting threads determine which thread is awakened. For policies SCHED_FIFO and SCHED_RR, a blocked thread is chosen in priority order, using first-in/first- out (FIFO) within priorities. This routine does not cause a thread blocked on a condition variable to resume execution immediately. A thread resumes execution at some time after the interrupt handler routine returns. If no threads are waiting on the condition variable at the time of the call to pthread_cond_signal_int_np(), the next future waiting thread will be automatically released (that is, it will not actually wait). This routine establishes a "pending" wake if necessary. You can call this routine regardless of whether the associated mutex is either locked or unlocked. (Never lock a mutex from an interrupt handler routine.) NOTE This routine allows you to signal a condition variable from a software interrupt handler. Do not call this routine from noninterrupt code. To signal a condition variable from the normal noninterrupt level, use pthread_cond_signal().
4 – Return Values
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Return Description 0 Successful completion. [EINVAL] The value specified by cond is not a valid condition variable.
5 – Associated Routines
pthread_cond_broadcast() pthread_cond_signal() pthread_cond_sig_preempt_int_np() pthread_cond_timedwait() pthread_cond_wait()