source: rtems/cpukit/score/include/rtems/score/thread.h @ 864d3475

4.115
Last change on this file since 864d3475 was 134a181, checked in by Jennifer Averett <jennifer.averett@…>, on 09/08/14 at 14:46:43

score: Add capture data to tcb.

  • Property mode set to 100644
File size: 24.0 KB
Line 
1/**
2 *  @file  rtems/score/thread.h
3 *
4 *  @brief Constants and Structures Related with the Thread Control Block
5 *
6 *  This include file contains all constants and structures associated
7 *  with the thread control block.
8 */
9
10/*
11 *  COPYRIGHT (c) 1989-2014.
12 *  On-Line Applications Research Corporation (OAR).
13 *
14 *  Copyright (c) 2014 embedded brains GmbH.
15 *
16 *  The license and distribution terms for this file may be
17 *  found in the file LICENSE in this distribution or at
18 *  http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef _RTEMS_SCORE_THREAD_H
22#define _RTEMS_SCORE_THREAD_H
23
24#include <rtems/score/context.h>
25#if defined(RTEMS_MULTIPROCESSING)
26#include <rtems/score/mppkt.h>
27#endif
28#include <rtems/score/object.h>
29#include <rtems/score/percpu.h>
30#include <rtems/score/priority.h>
31#include <rtems/score/resource.h>
32#include <rtems/score/stack.h>
33#include <rtems/score/states.h>
34#include <rtems/score/threadq.h>
35#include <rtems/score/watchdog.h>
36
37#if defined(RTEMS_SMP)
38  #include <rtems/score/cpuset.h>
39#endif
40
41struct Scheduler_Control;
42
43struct Scheduler_Node;
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/**
50 *  @defgroup ScoreThread Thread Handler
51 *
52 *  @ingroup Score
53 *
54 *  This handler encapsulates functionality related to the management of
55 *  threads.  This includes the creation, deletion, and scheduling of threads.
56 *
57 *  The following variables are maintained as part of the per cpu data
58 *  structure.
59 *
60 *  + Idle thread pointer
61 *  + Executing thread pointer
62 *  + Heir thread pointer
63 */
64/**@{*/
65
66#if defined(RTEMS_POSIX_API)
67  #define RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE
68#endif
69
70/*
71 * With the addition of the Constant Block Scheduler (CBS),
72 * this feature is needed even when POSIX is disabled.
73 */
74#define RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT
75
76#if defined(RTEMS_POSIX_API)
77  #define RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API
78#endif
79
80/*
81 *  The user can define this at configure time and go back to ticks
82 *  resolution.
83 */
84#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
85  #include <rtems/score/timestamp.h>
86
87  typedef Timestamp_Control Thread_CPU_usage_t;
88#else
89  typedef uint32_t Thread_CPU_usage_t;
90#endif
91
92/**
93 *  The following defines the "return type" of a thread.
94 *
95 *  @note  This cannot always be right.  Some APIs have void
96 *         tasks/threads, others return pointers, others may
97 *         return a numeric value.  Hopefully a pointer is
98 *         always at least as big as an uint32_t  . :)
99 */
100typedef void *Thread;
101
102/**
103 *  @brief Type of the numeric argument of a thread entry function with at
104 *  least one numeric argument.
105 *
106 *  This numeric argument type designates an unsigned integer type with the
107 *  property that any valid pointer to void can be converted to this type and
108 *  then converted back to a pointer to void.  The result will compare equal to
109 *  the original pointer.
110 */
111typedef uintptr_t Thread_Entry_numeric_type;
112
113/**
114 *  The following defines the ways in which the entry point for a
115 *  thread can be invoked.  Basically, it can be passed any
116 *  combination/permutation of a pointer and an uint32_t   value.
117 *
118 *  @note For now, we are ignoring the return type.
119 */
120typedef enum {
121  THREAD_START_NUMERIC,
122  THREAD_START_POINTER,
123  #if defined(FUNCTIONALITY_NOT_CURRENTLY_USED_BY_ANY_API)
124    THREAD_START_BOTH_POINTER_FIRST,
125    THREAD_START_BOTH_NUMERIC_FIRST
126  #endif
127} Thread_Start_types;
128
129/** This type corresponds to a very simple style thread entry point. */
130typedef Thread ( *Thread_Entry )( void );   /* basic type */
131
132/** This type corresponds to a thread entry point which takes a single
133 *  unsigned thirty-two bit integer as an argument.
134 */
135typedef Thread ( *Thread_Entry_numeric )( Thread_Entry_numeric_type );
136
137/** This type corresponds to a thread entry point which takes a single
138 *  untyped pointer as an argument.
139 */
140typedef Thread ( *Thread_Entry_pointer )( void * );
141
142/** This type corresponds to a thread entry point which takes a single
143 *  untyped pointer and an unsigned thirty-two bit integer as arguments.
144 */
145typedef Thread ( *Thread_Entry_both_pointer_first )( void *, Thread_Entry_numeric_type );
146
147/** This type corresponds to a thread entry point which takes a single
148 *  unsigned thirty-two bit integer and an untyped pointer and an
149 *  as arguments.
150 */
151typedef Thread ( *Thread_Entry_both_numeric_first )( Thread_Entry_numeric_type, void * );
152
153/**
154 *  The following lists the algorithms used to manage the thread cpu budget.
155 *
156 *  Reset Timeslice:   At each context switch, reset the time quantum.
157 *  Exhaust Timeslice: Only reset the quantum once it is consumed.
158 *  Callout:           Execute routine when budget is consumed.
159 */
160typedef enum {
161  THREAD_CPU_BUDGET_ALGORITHM_NONE,
162  THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE,
163  #if defined(RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE)
164    THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE,
165  #endif
166  #if defined(RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT)
167    THREAD_CPU_BUDGET_ALGORITHM_CALLOUT
168  #endif
169}  Thread_CPU_budget_algorithms;
170
171/**  This defines thes the entry point for the thread specific timeslice
172 *   budget management algorithm.
173 */
174typedef void (*Thread_CPU_budget_algorithm_callout )( Thread_Control * );
175
176#if !defined(RTEMS_SMP)
177/**
178 *  @brief Forward reference to the per task variable structure..
179 *
180 *  Forward reference to the per task variable structure.
181 */
182struct rtems_task_variable_tt;
183
184/**
185 *  @brief Internal structure used to manager per task variables.
186 *
187 *  This is the internal structure used to manager per Task Variables.
188 */
189typedef struct {
190  /** This field points to the next per task variable for this task. */
191  struct rtems_task_variable_tt  *next;
192  /** This field points to the physical memory location of this per
193   *  task variable.
194   */
195  void                          **ptr;
196  /** This field is to the global value for this per task variable. */
197  void                           *gval;
198  /** This field is to this thread's value for this per task variable. */
199  void                           *tval;
200  /** This field points to the destructor for this per task variable. */
201  void                          (*dtor)(void *);
202} rtems_task_variable_t;
203#endif
204
205/**
206 *  The following structure contains the information which defines
207 *  the starting state of a thread.
208 */
209typedef struct {
210  /** This field is the starting address for the thread. */
211  Thread_Entry                         entry_point;
212  /** This field indicates the how task is invoked. */
213  Thread_Start_types                   prototype;
214  /** This field is the pointer argument passed at thread start. */
215  void                                *pointer_argument;
216  /** This field is the numeric argument passed at thread start. */
217  Thread_Entry_numeric_type            numeric_argument;
218  /*-------------- initial execution modes ----------------- */
219  /** This field indicates whether the thread was preemptible when
220    * it started.
221    */
222  bool                                 is_preemptible;
223  /** This field indicates the CPU budget algorith. */
224  Thread_CPU_budget_algorithms         budget_algorithm;
225  /** This field is the routine to invoke when the CPU allotment is
226   *  consumed.
227   */
228  Thread_CPU_budget_algorithm_callout  budget_callout;
229  /** This field is the initial ISR disable level of this thread. */
230  uint32_t                             isr_level;
231  /** This field is the initial priority. */
232  Priority_Control                     initial_priority;
233  #if defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API)
234    /** This field indicates whether the SuperCore allocated the stack. */
235    bool                                 core_allocated_stack;
236  #endif
237  /** This field is the stack information. */
238  Stack_Control                        Initial_stack;
239  #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
240    /** This field is the initial FP context area address. */
241    Context_Control_fp                  *fp_context;
242  #endif
243  /** This field is the initial stack area address. */
244  void                                *stack;
245  /** The thread-local storage (TLS) area */
246  void                                *tls_area;
247} Thread_Start_information;
248
249/**
250 *  @brief Union type to hold a pointer to an immutable or a mutable object.
251 *
252 *  The main purpose is to enable passing of pointers to read-only send buffers
253 *  in the message passing subsystem.  This approach is somewhat fragile since
254 *  it prevents the compiler to check if the operations on objects are valid
255 *  with respect to the constant qualifier.  An alternative would be to add a
256 *  third pointer argument for immutable objects, but this would increase the
257 *  structure size.
258 */
259typedef union {
260  void       *mutable_object;
261  const void *immutable_object;
262} Thread_Wait_information_Object_argument_type;
263
264/**
265 *  @brief Information required to manage a thread while it is blocked.
266 *
267 *  This contains the information required to manage a thread while it is
268 *  blocked and to return information to it.
269 */
270typedef struct {
271  /** This field is the Id of the object this thread is waiting upon. */
272  Objects_Id            id;
273  /** This field is used to return an integer while when blocked. */
274  uint32_t              count;
275  /** This field is for a pointer to a user return argument. */
276  void                 *return_argument;
277  /** This field is for a pointer to a second user return argument. */
278  Thread_Wait_information_Object_argument_type
279                        return_argument_second;
280  /** This field contains any options in effect on this blocking operation. */
281  uint32_t              option;
282  /** This field will contain the return status from a blocking operation.
283   *
284   *  @note The following assumes that all API return codes can be
285   *        treated as an uint32_t.
286   */
287  uint32_t              return_code;
288
289  /** This field points to the thread queue on which this thread is blocked. */
290  Thread_queue_Control *queue;
291}   Thread_Wait_information;
292
293/**
294 *  The following defines the control block used to manage
295 *  each thread proxy.
296 *
297 *  @note It is critical that proxies and threads have identical
298 *        memory images for the shared part.
299 */
300typedef struct {
301  /** This field is the object management structure for each proxy. */
302  Objects_Control          Object;
303  /** This field is used to enqueue the thread on RBTrees. */
304  RBTree_Node              RBNode;
305  /** This field is the current execution state of this proxy. */
306  States_Control           current_state;
307  /** This field is the current priority state of this proxy. */
308  Priority_Control         current_priority;
309  /** This field is the base priority of this proxy. */
310  Priority_Control         real_priority;
311  /** This field is the number of mutexes currently held by this proxy. */
312  uint32_t                 resource_count;
313
314  /** This field is the blocking information for this proxy. */
315  Thread_Wait_information  Wait;
316  /** This field is the Watchdog used to manage proxy delays and timeouts. */
317  Watchdog_Control         Timer;
318#if defined(RTEMS_MULTIPROCESSING)
319  /** This field is the received response packet in an MP system. */
320  MP_packet_Prefix        *receive_packet;
321#endif
322     /****************** end of common block ********************/
323  /** This field is used to manage the set of proxies in the system. */
324  Chain_Node               Active;
325}   Thread_Proxy_control;
326
327/**
328 *  The following record defines the control block used
329 *  to manage each thread.
330 *
331 *  @note It is critical that proxies and threads have identical
332 *        memory images for the shared part.
333 */
334typedef enum {
335  /** This value is for the Classic RTEMS API. */
336  THREAD_API_RTEMS,
337  /** This value is for the POSIX API. */
338  THREAD_API_POSIX
339}  Thread_APIs;
340
341/** This macro defines the first API which has threads. */
342#define THREAD_API_FIRST THREAD_API_RTEMS
343
344/** This macro defines the last API which has threads. */
345#define THREAD_API_LAST  THREAD_API_POSIX
346
347typedef struct Thread_Action Thread_Action;
348
349/**
350 * @brief Thread action handler.
351 *
352 * The thread action handler will be called with interrupts disabled and the
353 * thread action lock acquired.  The handler must release the thread action
354 * lock with _Thread_Action_release_and_ISR_enable().  So the thread action
355 * lock can be used to protect private data fields of the particular action.
356 *
357 * Since the action is passed to the handler private data fields can be added
358 * below the common thread action fields.
359 *
360 * @param[in] thread The thread performing the action.
361 * @param[in] action The thread action.
362 * @param[in] cpu The processor of the thread.
363 * @param[in] level The ISR level for _Thread_Action_release_and_ISR_enable().
364 */
365typedef void ( *Thread_Action_handler )(
366  Thread_Control  *thread,
367  Thread_Action   *action,
368  Per_CPU_Control *cpu,
369  ISR_Level        level
370);
371
372/**
373 * @brief Thread action.
374 *
375 * Thread actions can be chained together to trigger a set of actions on
376 * particular events like for example a thread post-switch.  Use
377 * _Thread_Action_initialize() to initialize this structure.
378 *
379 * Thread actions are the building block for efficient implementation of
380 * - Classic signals delivery,
381 * - POSIX signals delivery,
382 * - thread restart notification,
383 * - thread delete notification,
384 * - forced thread migration on SMP configurations, and
385 * - the Multiprocessor Resource Sharing Protocol (MrsP).
386 *
387 * @see _Thread_Run_post_switch_actions().
388 */
389struct Thread_Action {
390  Chain_Node            Node;
391  Thread_Action_handler handler;
392};
393
394/**
395 * @brief Control block to manage thread actions.
396 *
397 * Use _Thread_Action_control_initialize() to initialize this structure.
398 */
399typedef struct {
400  Chain_Control Chain;
401} Thread_Action_control;
402
403/**
404 * @brief Thread life states.
405 *
406 * The thread life states are orthogonal to the thread states used for
407 * synchronization primitives and blocking operations.  They reflect the state
408 * changes triggered with thread restart and delete requests.
409 */
410typedef enum {
411  THREAD_LIFE_NORMAL = 0x0,
412  THREAD_LIFE_PROTECTED = 0x1,
413  THREAD_LIFE_RESTARTING = 0x2,
414  THREAD_LIFE_PROTECTED_RESTARTING = 0x3,
415  THREAD_LIFE_TERMINATING = 0x4,
416  THREAD_LIFE_PROTECTED_TERMINATING = 0x5,
417  THREAD_LIFE_RESTARTING_TERMINATING = 0x6,
418  THREAD_LIFE_PROTECTED_RESTARTING_TERMINATING = 0x7
419} Thread_Life_state;
420
421/**
422 * @brief Thread life control.
423 */
424typedef struct {
425  /**
426   * @brief Thread life action used to react upon thread restart and delete
427   * requests.
428   */
429  Thread_Action      Action;
430
431  /**
432   * @brief The current thread life state.
433   */
434  Thread_Life_state  state;
435
436  /**
437   * @brief The terminator thread of this thread.
438   *
439   * In case the thread is terminated and another thread (the terminator) waits
440   * for the actual termination completion, then this field references the
441   * terminator thread.
442   */
443  Thread_Control    *terminator;
444} Thread_Life_control;
445
446#if defined(RTEMS_SMP)
447/**
448 * @brief The thread state with respect to the scheduler.
449 */
450typedef enum {
451  /**
452   * @brief This thread is blocked with respect to the scheduler.
453   *
454   * This thread uses no scheduler nodes.
455   */
456  THREAD_SCHEDULER_BLOCKED,
457
458  /**
459   * @brief This thread is scheduled with respect to the scheduler.
460   *
461   * This thread executes using one of its scheduler nodes.  This could be its
462   * own scheduler node or in case it owns resources taking part in the
463   * scheduler helping protocol a scheduler node of another thread.
464   */
465  THREAD_SCHEDULER_SCHEDULED,
466
467  /**
468   * @brief This thread is ready with respect to the scheduler.
469   *
470   * None of the scheduler nodes of this thread is scheduled.
471   */
472  THREAD_SCHEDULER_READY
473} Thread_Scheduler_state;
474#endif
475
476/**
477 * @brief Thread scheduler control.
478 */
479typedef struct {
480#if defined(RTEMS_SMP)
481  /**
482   * @brief The current scheduler state of this thread.
483   */
484  Thread_Scheduler_state state;
485
486  /**
487   * @brief The own scheduler control of this thread.
488   *
489   * This field is constant after initialization.
490   */
491  const struct Scheduler_Control *own_control;
492
493  /**
494   * @brief The scheduler control of this thread.
495   *
496   * The scheduler helping protocol may change this field.
497   */
498  const struct Scheduler_Control *control;
499
500  /**
501   * @brief The own scheduler node of this thread.
502   *
503   * This field is constant after initialization.  It is used by change
504   * priority and ask for help operations.
505   */
506  struct Scheduler_Node *own_node;
507#endif
508
509  /**
510   * @brief The scheduler node of this thread.
511   *
512   * On uni-processor configurations this field is constant after
513   * initialization.
514   *
515   * On SMP configurations the scheduler helping protocol may change this
516   * field.
517   */
518  struct Scheduler_Node *node;
519
520#if defined(RTEMS_SMP)
521  /**
522   * @brief The processor assigned by the current scheduler.
523   */
524  Per_CPU_Control *cpu;
525
526#if defined(RTEMS_DEBUG)
527  /**
528   * @brief The processor on which this thread executed the last time or is
529   * executing.
530   */
531  Per_CPU_Control *debug_real_cpu;
532#endif
533#endif
534} Thread_Scheduler_control;
535
536typedef struct  {
537  uint32_t      flags;
538  void *        control;
539}Thread_Capture_control;
540
541/**
542 *  This structure defines the Thread Control Block (TCB).
543 */
544struct Thread_Control_struct {
545  /** This field is the object management structure for each thread. */
546  Objects_Control          Object;
547  /** This field is used to enqueue the thread on RBTrees. */
548  RBTree_Node              RBNode;
549  /** This field is the current execution state of this thread. */
550  States_Control           current_state;
551  /** This field is the current priority state of this thread. */
552  Priority_Control         current_priority;
553  /** This field is the base priority of this thread. */
554  Priority_Control         real_priority;
555  /** This field is the number of mutexes currently held by this thread. */
556  uint32_t                 resource_count;
557  /** This field is the blocking information for this thread. */
558  Thread_Wait_information  Wait;
559  /** This field is the Watchdog used to manage thread delays and timeouts. */
560  Watchdog_Control         Timer;
561#if defined(RTEMS_MULTIPROCESSING)
562  /** This field is the received response packet in an MP system. */
563  MP_packet_Prefix        *receive_packet;
564#endif
565#ifdef __RTEMS_STRICT_ORDER_MUTEX__
566  /** This field is the head of queue of priority inheritance mutex
567   *  held by the thread.
568   */
569  Chain_Control            lock_mutex;
570#endif
571#if defined(RTEMS_SMP)
572  /**
573   * @brief Resource node to build a dependency tree in case this thread owns
574   * resources or depends on a resource.
575   */
576  Resource_Node            Resource_node;
577#endif
578     /*================= end of common block =================*/
579#if defined(RTEMS_MULTIPROCESSING)
580  /** This field is true if the thread is offered globally */
581  bool                                  is_global;
582#endif
583  /** This field is true if the thread is preemptible. */
584  bool                                  is_preemptible;
585
586  /**
587   * @brief Scheduler related control.
588   */
589  Thread_Scheduler_control              Scheduler;
590
591#if __RTEMS_ADA__
592  /** This field is the GNAT self context pointer. */
593  void                                 *rtems_ada_self;
594#endif
595  /** This field is the length of the time quantum that this thread is
596   *  allowed to consume.  The algorithm used to manage limits on CPU usage
597   *  is specified by budget_algorithm.
598   */
599  uint32_t                              cpu_time_budget;
600  /** This field is the algorithm used to manage this thread's time
601   *  quantum.  The algorithm may be specified as none which case,
602   *  no limit is in place.
603   */
604  Thread_CPU_budget_algorithms          budget_algorithm;
605  /** This field is the method invoked with the budgeted time is consumed. */
606  Thread_CPU_budget_algorithm_callout   budget_callout;
607  /** This field is the amount of CPU time consumed by this thread
608   *  since it was created.
609   */
610  Thread_CPU_usage_t                    cpu_time_used;
611
612  /** This field contains information about the starting state of
613   *  this thread.
614   */
615  Thread_Start_information              Start;
616
617  Thread_Action_control                 Post_switch_actions;
618
619  /** This field contains the context of this thread. */
620  Context_Control                       Registers;
621#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
622  /** This field points to the floating point context for this thread.
623   *  If NULL, the thread is integer only.
624   */
625  Context_Control_fp                   *fp_context;
626#endif
627  /** This field points to the newlib reentrancy structure for this thread. */
628  struct _reent                        *libc_reent;
629  /** This array contains the API extension area pointers. */
630  void                                 *API_Extensions[ THREAD_API_LAST + 1 ];
631
632#if !defined(RTEMS_SMP)
633  /** This field points to the set of per task variables. */
634  rtems_task_variable_t                *task_variables;
635#endif
636
637  /**
638   * This is the thread key value chain's control, which is used
639   * to track all key value for specific thread, and when thread
640   * exits, we can remove all key value for specific thread by
641   * iterating this chain, or we have to search a whole rbtree,
642   * which is inefficient.
643   */
644  Chain_Control           Key_Chain;
645
646  /**
647   * @brief Thread life-cycle control.
648   *
649   * Control state changes triggered by thread restart and delete requests.
650   */
651  Thread_Life_control                   Life;
652
653  Thread_Capture_control                Capture;
654
655  /**
656   * @brief Variable length array of user extension pointers.
657   *
658   * The length is defined by the application via <rtems/confdefs.h>.
659   */
660  void                                 *extensions[ RTEMS_ZERO_LENGTH_ARRAY ];
661};
662
663#if (CPU_PROVIDES_IDLE_THREAD_BODY == FALSE)
664/**
665 *  This routine is the body of the system idle thread.
666 *
667 *  NOTE: This routine is actually instantiated by confdefs.h when needed.
668 */
669void *_Thread_Idle_body(
670  uintptr_t  ignored
671);
672#endif
673
674/**  This defines the type for a method which operates on a single thread.
675 */
676typedef void (*rtems_per_thread_routine)( Thread_Control * );
677
678/**
679 *  @brief Iterates over all threads.
680 *  This routine iterates over all threads regardless of API and
681 *  invokes the specified routine.
682 */
683void rtems_iterate_over_all_threads(
684  rtems_per_thread_routine routine
685);
686
687/**
688 * @brief Returns the thread control block of the executing thread.
689 *
690 * This function can be called in any context.  On SMP configurations
691 * interrupts are disabled to ensure that the processor index is used
692 * consistently.
693 *
694 * @return The thread control block of the executing thread.
695 */
696RTEMS_INLINE_ROUTINE Thread_Control *_Thread_Get_executing( void )
697{
698  Thread_Control *executing;
699
700  #if defined( RTEMS_SMP )
701    ISR_Level level;
702
703    _ISR_Disable_without_giant( level );
704  #endif
705
706  executing = _Thread_Executing;
707
708  #if defined( RTEMS_SMP )
709    _ISR_Enable_without_giant( level );
710  #endif
711
712  return executing;
713}
714
715/**
716 * @brief Thread control add-on.
717 */
718typedef struct {
719  /**
720   * @brief Offset of the pointer field in Thread_Control referencing an
721   * application configuration dependent memory area in the thread control
722   * block.
723   */
724  size_t destination_offset;
725
726  /**
727   * @brief Offset relative to the thread control block begin to an application
728   * configuration dependent memory area.
729   */
730  size_t source_offset;
731} Thread_Control_add_on;
732
733/**
734 * @brief Thread control add-ons.
735 *
736 * The thread control block contains fields that point to application
737 * configuration dependent memory areas, like the scheduler information, the
738 * API control blocks, the user extension context table, the RTEMS notepads and
739 * the Newlib re-entrancy support.  Account for these areas in the
740 * configuration and avoid extra workspace allocations for these areas.
741 *
742 * This array is provided via <rtems/confdefs.h>.
743 *
744 * @see _Thread_Control_add_on_count and _Thread_Control_size.
745 */
746extern const Thread_Control_add_on _Thread_Control_add_ons[];
747
748/**
749 * @brief Thread control add-on count.
750 *
751 * Count of entries in _Thread_Control_add_ons.
752 *
753 * This value is provided via <rtems/confdefs.h>.
754 */
755extern const size_t _Thread_Control_add_on_count;
756
757/**
758 * @brief Size of the thread control block of a particular application.
759 *
760 * This value is provided via <rtems/confdefs.h>.
761 *
762 * @see _Thread_Control_add_ons.
763 */
764extern const size_t _Thread_Control_size;
765
766/**@}*/
767
768#ifdef __cplusplus
769}
770#endif
771
772#endif
773/* end of include file */
Note: See TracBrowser for help on using the repository browser.