source: rtems/cpukit/posix/include/rtems/posix/cancel.h @ c499856

4.115
Last change on this file since c499856 was c499856, checked in by Chris Johns <chrisj@…>, on 03/20/14 at 21:10:47

Change all references of rtems.com to rtems.org.

  • Property mode set to 100644
File size: 1.7 KB
Line 
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 */
28typedef 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 */
47void _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 */
59void _POSIX_Thread_Evaluate_cancellation_and_enable_dispatch (
60  Thread_Control *the_thread
61);
62
63#endif
64/* end of include file */
Note: See TracBrowser for help on using the repository browser.