PTHREAD_TIMECHANGE_HANDLER_NP(3) manual page

#### POSIX Threads for Windows – REFERENCE - Pthreads4W

Reference Index

Table of Contents

## Name

pthread_timechange_handler_np – alert timed waiting condition variables to system time changes.

## Synopsis

#include <pthread.h>

void * pthread_timechange_handler_np(void * dummy);

## Description

To improve tolerance against operator or time service initiated system clock changes.

pthread_timechange_handler_np can be called by an application when it receives a WM_TIMECHANGE message from the system. At present it broadcasts all condition variables so that waiting threads can wake up and re-evaluate their conditions and restart their timed waits if required.

pthread_timechange_handler_np has the same return type and argument type as a thread routine so that it may be called directly through pthread_create(), i.e. as a separate thread. If run as a thread, the return code must be retrieved through pthread_join().

Although the dummy parameter is required it is not used and any value including NULL can be given.

## Cancellation

None.

## Return Value

pthread_timechange_handler_np returns 0 on success, or an error code.

## Errors

The pthread_timechange_handler_np function returns the following error code on error:

EAGAIN

To indicate that not all condition variables were signalled for some reason.

## Author

Ross Johnson for use with Pthreads4W.

Table of Contents

- Name

- Synopsis

- Description

- Cancellation

- Return Value

- Errors

- Author