pthread_get_expiration_np(3) — Subroutines
NAME
pthread_get_expiration_np − Obtains a value representing a desired expiration time.
SYNOPSIS
#include <pthread.h>
int pthread_get_expiration_np(
struct timespec ∗delta ,
struct timespec ∗abstime );
PARAMETERS
deltaNumber of seconds and nanoseconds to add to the current system time. The result is the time that a timed wait expires.
abstimeValue representing the expiration time.
DESCRIPTION
This routine adds a specified interval to the current absolute system time and returns a new absolute time. This new absolute time is used as the expiration time in a call to pthread_cond_wait.
The truct timespec structure contains the following two fields:
•tv.sec is an integer number of seconds
•tv.nsec is an integer number of nanoseconds
RETURN VALUES
If an error condition occurs, this routine returns −1 and errno is set to the corresponding error value. Possible return values are as follows:
| Return | Error | Description |
| 0 | Successful completion. | |
| −1 | [EINVAL] | The value specified by delta is invalid. |
RELATED INFORMATION
pthread_cond_signal(3), pthread_cond_timedwait(3), pthread_cond_wait(3),