source: rtems/cpukit/posix/include/rtems/posix/threadsup.h @ abd3636

4.10
Last change on this file since abd3636 was abd3636, checked in by Ralf Corsepius <ralf.corsepius@…>, on 06/14/10 at 06:04:07

2010-06-14 Ralf Corsépius <ralf.corsepius@…>

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