Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pthread_delay_np(3) [osf1 man page]

pthread_delay_np(3)					     Library Functions Manual					       pthread_delay_np(3)

NAME
pthread_delay_np - Delays a thread's execution. LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_delay_np( const struct timespec *interval); STANDARDS
None PARAMETERS
Number of seconds and nanoseconds to delay execution. The value specified for each must be greater than or equal to zero. DESCRIPTION
This routine causes a thread to delay execution for a specific interval of time. This interval ends at the current time plus the specified interval. The routine will not return before the end of the interval is reached, but may return an arbitrary amount of time after the end of the interval is reached. This can be due to system load, thread priorities, and system timer granularity. Specifying an interval of zero (0) seconds and zero (0) nanoseconds is allowed and can be used to force the thread to give up the processor or to deliver a pending cancelation request. The timespec structure contains the following two fields: tv_sec is an integral number of seconds. tv_nsec is an integral number of nanoseconds. RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. The value specified by interval is invalid. ERRORS
None RELATED INFORMATION
Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_delay_np(3)

Check Out this Related Man Page

pthread_cond_signal_int_np(3)				     Library Functions Manual				     pthread_cond_signal_int_np(3)

NAME
pthread_cond_signal_int_np - Wakes one thread that is waiting on the specified condition variable (called from interrupt level only). LIBRARY
DECthreads POSIX 1003.1c Library (libpthread.so) SYNOPSIS
#include <pthread.h> int pthread_cond_signal_int_np( pthread_cond_t *cond); STANDARDS
None PARAMETERS
Condition variable to be signaled. DESCRIPTION
This routine wakes one thread waiting on the specified condition variable. It can only be called from a software interrupt handler routine (that is, 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. You can call this routine regardless of whether the associated mutex is locked (by some other thread). Never lock a mutex from an inter- rupt handler routine. Note This routine allows you to signal a thread from a software interrupt handler. Do not call this routine from noninterrupt code. To signal a thread from the normal noninterrupt level, use pthread_cond_signal(3). RETURN VALUES
If an error condition occurs, this routine returns an integer value indicating the type of error. Possible return values are as follows: Successful completion. The value specified by cond is invalid. ERRORS
None RELATED INFORMATION
Functions: pthread_cond_broadcast(3), pthread_cond_signal(3), pthread_cond_timedwait(3), pthread_cond_wait(3) Manuals: Guide to DECthreads and Programmer's Guide delim off pthread_cond_signal_int_np(3)
Man Page