RTEMS CPU Kit with SuperCore  4.10.99.0
Data Structures | Defines | Typedefs | Enumerations | Functions | Variables
rtems/score/thread.h File Reference

Constants and Structures Related with the Thread Control Block. More...

#include <rtems/score/context.h>
#include <rtems/score/mppkt.h>
#include <rtems/score/object.h>
#include <rtems/score/percpu.h>
#include <rtems/score/priority.h>
#include <rtems/score/resource.h>
#include <rtems/score/stack.h>
#include <rtems/score/states.h>
#include <rtems/score/threadq.h>
#include <rtems/score/watchdog.h>
#include <rtems/score/cpuset.h>
#include <rtems/score/timestamp.h>
Include dependency graph for thread.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Thread_Start_information
 The following structure contains the information which defines the starting state of a thread. More...
union  Thread_Wait_information_Object_argument_type
 Union type to hold a pointer to an immutable or a mutable object. More...
struct  Thread_Wait_information
 Information required to manage a thread while it is blocked. More...
struct  Thread_Proxy_control
 The following defines the control block used to manage each thread proxy. More...
struct  Thread_Action
 Thread action. More...
struct  Thread_Action_control
 Control block to manage thread actions. More...
struct  Thread_Life_control
 Thread life control. More...
struct  Thread_Scheduler_control
 Thread scheduler control. More...
struct  Thread_Capture_control
struct  Thread_Control_struct
 This structure defines the Thread Control Block (TCB). More...
struct  Thread_Control_add_on
 Thread control add-on. More...

Defines

#define RTEMS_SCORE_THREAD_ENABLE_EXHAUST_TIMESLICE
#define RTEMS_SCORE_THREAD_ENABLE_SCHEDULER_CALLOUT
#define RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API
#define THREAD_API_FIRST   THREAD_API_RTEMS
 This macro defines the first API which has threads.
#define THREAD_API_LAST   THREAD_API_POSIX
 This macro defines the last API which has threads.

Typedefs

typedef Timestamp_Control Thread_CPU_usage_t
typedef void * Thread
 The following defines the "return type" of a thread.
typedef uintptr_t Thread_Entry_numeric_type
 Type of the numeric argument of a thread entry function with at least one numeric argument.
typedef Thread(* Thread_Entry )(void)
 This type corresponds to a very simple style thread entry point.
typedef Thread(* Thread_Entry_numeric )(Thread_Entry_numeric_type)
 This type corresponds to a thread entry point which takes a single unsigned thirty-two bit integer as an argument.
typedef Thread(* Thread_Entry_pointer )(void *)
 This type corresponds to a thread entry point which takes a single untyped pointer as an argument.
typedef Thread(* Thread_Entry_both_pointer_first )(void *, Thread_Entry_numeric_type)
 This type corresponds to a thread entry point which takes a single untyped pointer and an unsigned thirty-two bit integer as arguments.
typedef Thread(* Thread_Entry_both_numeric_first )(Thread_Entry_numeric_type, void *)
 This type corresponds to a thread entry point which takes a single unsigned thirty-two bit integer and an untyped pointer and an as arguments.
typedef void(* Thread_CPU_budget_algorithm_callout )(Thread_Control *)
 This defines thes the entry point for the thread specific timeslice budget management algorithm.
typedef struct Thread_Action Thread_Action
typedef void(* Thread_Action_handler )(Thread_Control *thread, Thread_Action *action, Per_CPU_Control *cpu, ISR_Level level)
 Thread action handler.
typedef void(* rtems_per_thread_routine )(Thread_Control *)
 This defines the type for a method which operates on a single thread.

Enumerations

enum  Thread_Start_types { THREAD_START_NUMERIC, THREAD_START_POINTER }
 The following defines the ways in which the entry point for a thread can be invoked. More...
enum  Thread_CPU_budget_algorithms { THREAD_CPU_BUDGET_ALGORITHM_NONE, THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE, THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE, THREAD_CPU_BUDGET_ALGORITHM_CALLOUT }
 The following lists the algorithms used to manage the thread cpu budget. More...
enum  Thread_APIs { THREAD_API_RTEMS, THREAD_API_POSIX }
 The following record defines the control block used to manage each thread. More...
enum  Thread_Life_state {
  THREAD_LIFE_NORMAL = 0x0, THREAD_LIFE_PROTECTED = 0x1, THREAD_LIFE_RESTARTING = 0x2, THREAD_LIFE_PROTECTED_RESTARTING = 0x3,
  THREAD_LIFE_TERMINATING = 0x4, THREAD_LIFE_PROTECTED_TERMINATING = 0x5, THREAD_LIFE_RESTARTING_TERMINATING = 0x6, THREAD_LIFE_PROTECTED_RESTARTING_TERMINATING = 0x7
}
 Thread life states. More...
enum  Thread_Scheduler_state { THREAD_SCHEDULER_BLOCKED, THREAD_SCHEDULER_SCHEDULED, THREAD_SCHEDULER_READY }
 The thread state with respect to the scheduler. More...

Functions

void * _Thread_Idle_body (uintptr_t ignored)
 This routine is the body of the system idle thread.
void rtems_iterate_over_all_threads (rtems_per_thread_routine routine)
 Iterates over all threads.
RTEMS_INLINE_ROUTINE
Thread_Control
_Thread_Get_executing (void)
 Returns the thread control block of the executing thread.

Variables

const Thread_Control_add_on _Thread_Control_add_ons []
 Thread control add-ons.
const size_t _Thread_Control_add_on_count
 Thread control add-on count.
const size_t _Thread_Control_size
 Size of the thread control block of a particular application.

Detailed Description

Constants and Structures Related with the Thread Control Block.

This include file contains all constants and structures associated with the thread control block.