cancel

Cancels any current call to delay for the specified thread.

Library:LibC
Service:General C Services

Syntax

  #include <unistd.h> 
   
  int cancel (
     int   t_id); 
  

Parameters

t_id

(IN) Specifies the target thread, exactly as returned by the function that created the thread.

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:

Decimal

Constant

Description

77

ESRCH

The specified thread does not exist.

78

ECANCELED

The operation is invalid because the target thread has never entered a delay or sleep state.

See Also