Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pthread_yield(3)

pthread_delay_np(3)

NAME

pthread_delay_np - Causes a thread to wait for a specified period

SYNOPSIS

#include <pthread.h> int pthread_delay_np( struct timespec *interval);

PARAMETERS

intervalNumber of seconds and nanoseconds that the calling thread waits before continuing execution. The value specified must be greater than or equal to 0 (zero). 

DESCRIPTION

The pthread_delay_np() routine causes a thread to delay execution for a specified period of elapsed wall clock time. The period of time the thread waits is at least as long as the number of seconds and nanoseconds specified in the interval parameter. Specifying an interval of 0 seconds and 0 nanoseconds is allowed and can result in the thread giving up the processor or delivering a pending cancel. The struct timespec structure contains two fields, as follows:

•The tv_sec field is an integer number of seconds. 

•The tv_nsec field is an integer number of nanoseconds. 

This routine is a new primitive. 

RETURN VALUES

If the function fails, errno may be set to one of the following values:

Return Error Description
0 Successful completion.
\-1 [EINVAL] The value specified by interval is invalid.

RELATED INFORMATION

Functions:  pthread_yield(3). 

Hewlett-Packard Company  —  OSF DCE 1.1/HP DCE 1.5

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026