Open System Services System Calls Reference Manual (G06.25+, H06.03+)

pthread_delay_np(2) OSS System Calls Ref
erence Manual
NAME
pthread_delay_np - Delays execution of a thread
LIBRARY
G-series native OSS processes: /G/system/sysnn/zsptsrl
H-series OSS processes: /G/system/zdllnnn/zsptdll
SYNOPSIS
#include <spthread.h>
int pthread_delay_np(
const struct timespec *interval );
PARAMETERS
interval species the number of seconds and nanoseconds to delay execution. The value
specied for each must be greater than or equal to 0 (zero).
DESCRIPTION
This function causes a thread to delay execution for a specic interval of time. This interval ends
at the current time plus the specied interval. The function does not return before the end of the
interval is reached, but it might return an arbitrary amount of time after the end of the interval is
reached, because of system load, thread priorities, and system timer granularity.
Specifying an interval of 0 (zero) seconds and 0 (zero) 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 elds:
tv_sec is an integral number of seconds.
tv_nsec is an integral number of nanoseconds.
RETURN VALUES
If an error condition occurs, this function returns an integer value indicating the type of error.
Possible return values are:
0 Successful completion.
[EINVAL] The value specied by the interval parameter is invalid.
STANDARDS CONFORMANCE
This function is an extension to the XPG4 Version 2 specication and to the following industry
standards:
IEEE Std 1003.1c-1995, POSIX System Application Program Interface
558 Hewlett-Packard Company 527186-003