source: rtems/cpukit/posix/include/rtems/posix/threadsup.h @ 34d12977

4.115
Last change on this file since 34d12977 was a0e6c73, checked in by Mathew Kallada <matkallada@…>, on 12/14/12 at 01:51:15

posix: Doxygen enhancement task #4

http://www.google-melange.com/gci/task/view/google/gci2012/7955219

  • Property mode set to 100644
File size: 3.1 KB
Line 
1/**
2 * @file rtems/posix/threadsup.h
3 *
4 * This defines the POSIX thread API extension.
5 */
6
7/*
8 *  COPYRIGHT (c) 1989-2011.
9 *  On-Line Applications Research Corporation (OAR).
10 *
11 *  The license and distribution terms for this file may be
12 *  found in the file LICENSE in this distribution or at
13 *  http://www.rtems.com/license/LICENSE.
14 */
15
16#ifndef _RTEMS_POSIX_THREADSUP_H
17#define _RTEMS_POSIX_THREADSUP_H
18
19#include <sys/signal.h>
20#include <rtems/score/coresem.h>
21#include <rtems/score/tqdata.h>
22
23/**
24 *  @defgroup POSIX_THREAD Thread API Extension
25 *
26 *  @ingroup POSIX
27 */
28/**@{*/
29#ifdef __cplusplus
30extern "C" {
31#endif
32
33/*!
34 *  This defines the POSIX API support structure associated with
35 *  each thread in a system with POSIX configured.
36 */
37typedef struct {
38  /** This is the POSIX threads attribute set. */
39  pthread_attr_t          Attributes;
40  /** This indicates whether the thread is attached or detached. */
41  int                     detachstate;
42  /** This is the set of threads waiting for the thread to exit. */
43  Thread_queue_Control    Join_List;
44  /** This is the thread's current scheduling policy. */
45  int                     schedpolicy;
46  /** This is the thread's current set of scheduling parameters. */
47  struct sched_param      schedparam;
48  /**
49   *  This is the high priority to execute at when using the sporadic
50   *  scheduler.
51   */
52  int                     ss_high_priority;
53  /**
54   *  This is the timer which controls when the thread executes at
55   *  high and low priority when using the sporadic scheduler.
56   */
57  Watchdog_Control        Sporadic_timer;
58
59  /** This is the set of signals which are currently blocked. */
60  sigset_t                signals_blocked;
61  /** This is the set of signals which are currently pending. */
62  sigset_t                signals_pending;
63
64  /*******************************************************************/
65  /*******************************************************************/
66  /***************         POSIX Cancelability         ***************/
67  /*******************************************************************/
68  /*******************************************************************/
69
70  /** This is the cancelability state. */
71  int                     cancelability_state;
72  /** This is the cancelability type. */
73  int                     cancelability_type;
74  /** This indicates if a cancelation has been requested. */
75  int                     cancelation_requested;
76  /** This is the set of cancelation handlers. */
77  Chain_Control           Cancellation_Handlers;
78
79} POSIX_API_Control;
80
81/*!
82 *  @brief POSIX Thread Exit Shared Helper
83 *
84 *  16.1.5.1 Thread Termination, p1003.1c/Draft 10, p. 150
85 *
86 *  This method is a helper routine which ensures that all
87 *  POSIX thread calls which result in a thread exiting will
88 *  do so in the same manner.
89 *
90 *  @param[in] the_thread is the thread exiting or being canceled
91 *  @param[in] value_ptr is the value to be returned by the thread
92 *
93 *  NOTE: Key destructors are executed in the POSIX api delete extension.
94 *
95 */
96void _POSIX_Thread_Exit(
97  Thread_Control *the_thread,
98  void           *value_ptr
99);
100
101#ifdef __cplusplus
102}
103#endif
104/**@}*/
105#endif
106/* end of include file */
Note: See TracBrowser for help on using the repository browser.