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

5
Last change on this file since af9115f3 was af9115f3, checked in by Sebastian Huber <sebastian.huber@…>, on 10/06/17 at 08:07:38

posix: Simplify POSIX_API_Control

Return stack area via pthread_getattr_np().

Simplify

  • pthread_attr_setaffinity_np(), and
  • pthread_attr_getaffinity_np()

and let the scheduler do the more sophisticated error checks.

Make

  • pthread_setaffinity_np(),
  • pthread_getaffinity_np(),
  • pthread_attr_setaffinity_np(), and
  • pthread_attr_getaffinity_np()

available in all configurations.

Update #2514.
Close #3145.
Close #3168.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/**
2 * @file
3 *
4 * @brief POSIX Thread API Support
5 *
6 * This defines the POSIX thread API extension.
7 */
8
9/*
10 *  COPYRIGHT (c) 1989-2014.
11 *  On-Line Applications Research Corporation (OAR).
12 *
13 *  The license and distribution terms for this file may be
14 *  found in the file LICENSE in this distribution or at
15 *  http://www.rtems.org/license/LICENSE.
16 */
17
18#ifndef _RTEMS_POSIX_THREADSUP_H
19#define _RTEMS_POSIX_THREADSUP_H
20
21#include <rtems/score/thread.h>
22#include <rtems/score/watchdog.h>
23
24#include <pthread.h>
25#include <signal.h>
26
27/**
28 *  @defgroup POSIX_THREAD POSIX Thread API Extension
29 *
30 *  @ingroup POSIXAPI
31 *
32 */
33/**@{**/
34#ifdef __cplusplus
35extern "C" {
36#endif
37
38/**
39 * This defines the POSIX API support structure associated with
40 * each thread in a system with POSIX configured.
41 */
42typedef struct {
43  /** Back pointer to thread of this POSIX API control. */
44  Thread_Control         *thread;
45
46  /** Created with explicit or inherited scheduler. */
47  bool created_with_explicit_scheduler;
48
49  /** The scheduler policy. */
50  int schedpolicy;
51
52  /** The scheduler parameters */
53  struct sched_param schedparam;
54
55  /**
56   * @brief Control block for the sporadic server scheduling policy.
57   */
58  struct {
59    /**
60     * @brief This is the timer which controls when the thread executes at high
61     * and low priority when using the sporadic server scheduling policy.
62     */
63    Watchdog_Control Timer;
64
65    /**
66     * @brief The low priority when using the sporadic server scheduling
67     * policy.
68     */
69    Priority_Node Low_priority;
70  } Sporadic;
71
72  /** This is the set of signals which are currently unblocked. */
73  sigset_t                signals_unblocked;
74  /** This is the set of signals which are currently pending. */
75  sigset_t                signals_pending;
76
77  /**
78   * @brief Signal post-switch action in case signals are pending.
79   */
80  Thread_Action           Signal_action;
81} POSIX_API_Control;
82
83/** @} */
84
85#ifdef __cplusplus
86}
87#endif
88
89#endif
90/* end of include file */
Note: See TracBrowser for help on using the repository browser.