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