[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Base Operating System and Extensions Technical Reference, Volume 1

pthread_get_expiration_np Subroutine

Purpose

Obtains a value representing a desired expiration time.

Library

Threads Library (libpthreads.a)

Syntax

#include <pthread.h>
int pthread_get_expiration_np (delta, abstime)
struct timespec *delta;
struct timespec *abstime;

Description

The pthread_get_expiration_np subroutine adds the interval delta to the current absolute system time and returns a new absolute time. This new absolute time can be used as the expiration time in a call to the pthread_cond_timedwait subroutine.

Notes:
  1. The pthread.h header file must be the first included file of each source file using the threads library. Otherwise, the -D_THREAD_SAFE compilation flag should be used, or the cc_r compiler used. In this case, the flag is automatically set.
  2. The pthread_get_expiration_np subroutine is not portable.

Parameters

delta Points to the time structure specifying the interval.
abstime Points to where the new absolute time will be stored.

Return Values

Upon successful completion, the new absolute time is returned via the abstime parameter, and 0 is returned. Otherwise, an error code is returned.

Error Codes

The pthread_get_expiration_np subroutine is unsuccessful if the following is true:

EINVAL The delta or abstime parameters are not valid.

Implementation Specifics

This subroutine is part of the Base Operating System (BOS) Runtime.

This subroutine is not POSIX compliant and is provided only for compatibility with DCE threads. It should not be used when writing new applications.

Related Information

The pthread_cond_timedwait subroutine.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]