source: rtems/cpukit/posix/include/rtems/posix/threadsup.h @ 7147dc4

5
Last change on this file since 7147dc4 was 7147dc4, checked in by Sebastian Huber <sebastian.huber@…>, on 11/08/17 at 13:37:35

posix: Remove POSIX_API_Control::schedpolicy

Use the thread CPU budget algorithm to determine the scheduler policy.
This fixes also pthread_getschedparam() for Classic tasks.

Update #2514.

  • Property mode set to 100644
File size: 2.2 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  /** Created with explicit or inherited scheduler. */
44  bool created_with_explicit_scheduler;
45
46  /**
47   * @brief Control block for the sporadic server scheduling policy.
48   */
49  struct {
50    /** The thread of this sporadic control block */
51    Thread_Control *thread;
52
53    /**
54     * @brief This is the timer which controls when the thread executes at high
55     * and low priority when using the sporadic server scheduling policy.
56     */
57    Watchdog_Control Timer;
58
59    /**
60     * @brief The low priority when using the sporadic server scheduling
61     * policy.
62     */
63    Priority_Node Low_priority;
64
65    /**
66     * @brief Replenishment period for sporadic server.
67     */
68    struct timespec sched_ss_repl_period;
69
70    /**
71     * @brief Initial budget for sporadic server.
72     */
73    struct timespec sched_ss_init_budget;
74
75    /**
76     * @brief Maximum pending replenishments.
77     *
78     * Only used by pthread_getschedparam() and pthread_getattr_np().
79    */
80    int sched_ss_max_repl;
81  } Sporadic;
82
83  /** This is the set of signals which are currently unblocked. */
84  sigset_t                signals_unblocked;
85  /** This is the set of signals which are currently pending. */
86  sigset_t                signals_pending;
87
88  /**
89   * @brief Signal post-switch action in case signals are pending.
90   */
91  Thread_Action           Signal_action;
92} POSIX_API_Control;
93
94/** @} */
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif
101/* end of include file */
Note: See TracBrowser for help on using the repository browser.