1 | /** |
---|
2 | * @file |
---|
3 | * |
---|
4 | * @brief POSIX Thread Cancelation Support |
---|
5 | * |
---|
6 | * This file contains the prototypes and data types used to implement |
---|
7 | * POSIX thread cancelation. |
---|
8 | */ |
---|
9 | |
---|
10 | /* |
---|
11 | * COPYRIGHT (c) 1989-2009. |
---|
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.org/license/LICENSE. |
---|
17 | */ |
---|
18 | |
---|
19 | #ifndef _RTEMS_POSIX_CANCEL_H |
---|
20 | #define _RTEMS_POSIX_CANCEL_H |
---|
21 | |
---|
22 | #include <rtems/posix/threadsup.h> |
---|
23 | |
---|
24 | #ifndef HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT |
---|
25 | /** |
---|
26 | * This structure is used to manage the cancelation handlers. |
---|
27 | */ |
---|
28 | typedef struct { |
---|
29 | /** This field is the Chain Node so we can put these on lists. */ |
---|
30 | Chain_Node Node; |
---|
31 | /** This field is the cancelation routine. */ |
---|
32 | void (*routine)( void * ); |
---|
33 | /** This field is the argument to the cancelation routine. */ |
---|
34 | void *arg; |
---|
35 | } POSIX_Cancel_Handler_control; |
---|
36 | #endif /* HAVE_STRUCT__PTHREAD_CLEANUP_CONTEXT */ |
---|
37 | |
---|
38 | /** |
---|
39 | * @brief POSIX run thread cancelation. |
---|
40 | * |
---|
41 | * This support routine runs through the chain of cancel handlers that |
---|
42 | * have been registered and executes them. |
---|
43 | * |
---|
44 | * @param[in] the_thread is a pointer to the thread whose cancelation handlers |
---|
45 | * should be run |
---|
46 | */ |
---|
47 | void _POSIX_Threads_cancel_run( |
---|
48 | Thread_Control *the_thread |
---|
49 | ); |
---|
50 | |
---|
51 | /** |
---|
52 | * @brief POSIX evaluate thread cancelation and enable dispatch. |
---|
53 | * |
---|
54 | * This routine separates a piece of code that existed as part of |
---|
55 | * another routine, but had to be separated to improve coverage. |
---|
56 | * |
---|
57 | * @param[in] the_thread is a pointer to the thread to evaluate canceling |
---|
58 | */ |
---|
59 | void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch ( |
---|
60 | Thread_Control *the_thread |
---|
61 | ); |
---|
62 | |
---|
63 | #endif |
---|
64 | /* end of include file */ |
---|