[6c2675d] | 1 | /** |
---|
[cf301c9] | 2 | * @file |
---|
| 3 | * |
---|
| 4 | * @brief POSIX Thread Cancelation Support |
---|
[75eaf66] | 5 | * |
---|
| 6 | * This file contains the prototypes and data types used to implement |
---|
| 7 | * POSIX thread cancelation. |
---|
[6c2675d] | 8 | */ |
---|
| 9 | |
---|
[feaa007] | 10 | /* |
---|
[68799a2a] | 11 | * COPYRIGHT (c) 1989-2009. |
---|
[feaa007] | 12 | * On-Line Applications Research Corporation (OAR). |
---|
| 13 | * |
---|
| 14 | * The license and distribution terms for this file may be |
---|
| 15 | * found in the file LICENSE in this distribution or at |
---|
| 16 | * http://www.rtems.com/license/LICENSE. |
---|
[5e9b32b] | 17 | */ |
---|
| 18 | |
---|
[5ec2f12d] | 19 | #ifndef _RTEMS_POSIX_CANCEL_H |
---|
| 20 | #define _RTEMS_POSIX_CANCEL_H |
---|
[5e9b32b] | 21 | |
---|
[68799a2a] | 22 | #include <rtems/posix/threadsup.h> |
---|
| 23 | |
---|
[75eaf66] | 24 | /** |
---|
[cf301c9] | 25 | * This structure is used to manage the cancelation handlers. |
---|
[75eaf66] | 26 | */ |
---|
[5e9b32b] | 27 | typedef struct { |
---|
[75eaf66] | 28 | /** This field is the Chain Node so we can put these on lists. */ |
---|
[5e9b32b] | 29 | Chain_Node Node; |
---|
[75eaf66] | 30 | /** This field is the cancelation routine. */ |
---|
[5e9b32b] | 31 | void (*routine)( void * ); |
---|
[75eaf66] | 32 | /** This field is the argument to the cancelation routine. */ |
---|
[5e9b32b] | 33 | void *arg; |
---|
| 34 | } POSIX_Cancel_Handler_control; |
---|
| 35 | |
---|
[75eaf66] | 36 | /** |
---|
[cf301c9] | 37 | * @brief POSIX run thread cancelation. |
---|
[0a3946f] | 38 | * |
---|
[cf301c9] | 39 | * This support routine runs through the chain of cancel handlers that |
---|
| 40 | * have been registered and executes them. |
---|
[75eaf66] | 41 | * |
---|
[cf301c9] | 42 | * @param[in] the_thread is a pointer to the thread whose cancelation handlers |
---|
| 43 | * should be run |
---|
[0a3946f] | 44 | */ |
---|
[f845e96e] | 45 | void _POSIX_Threads_cancel_run( |
---|
[0a3946f] | 46 | Thread_Control *the_thread |
---|
| 47 | ); |
---|
| 48 | |
---|
[75eaf66] | 49 | /** |
---|
[cf301c9] | 50 | * @brief POSIX evaluate thread cancelation and enable dispatch. |
---|
[68799a2a] | 51 | * |
---|
[cf301c9] | 52 | * This routine separates a piece of code that existed as part of |
---|
| 53 | * another routine, but had to be separated to improve coverage. |
---|
[75eaf66] | 54 | * |
---|
[cf301c9] | 55 | * @param[in] the_thread is a pointer to the thread to evaluate canceling |
---|
[68799a2a] | 56 | */ |
---|
| 57 | void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch ( |
---|
[75eaf66] | 58 | Thread_Control *the_thread |
---|
[68799a2a] | 59 | ); |
---|
| 60 | |
---|
[5e9b32b] | 61 | #endif |
---|
| 62 | /* end of include file */ |
---|