RTEMS CPU Kit with SuperCore
4.11.3
|
Private Support Information for POSIX Threads. More...
![]() |
Files | |
file | psxtransschedparam.c |
Translate sched_param into SuperCore Terms. | |
file | pthreadinitthreads.c |
POSIX Threads Initialize User Threads Body. | |
Macros | |
#define | PTHREAD_MINIMUM_STACK_SIZE (_Stack_Minimum() * 2) |
The following sets the minimum stack size for POSIX threads. | |
Functions | |
void | _POSIX_Threads_Initialize_user_threads_body (void) |
POSIX threads initialize user threads body. More... | |
void | _POSIX_Threads_Manager_initialization (void) |
POSIX threads manager initialization. More... | |
RTEMS_INLINE_ROUTINE void | _POSIX_Threads_Copy_attributes (pthread_attr_t *dst_attr, const pthread_attr_t *src_attr) |
Copy POSIX Thread attribute structure. More... | |
RTEMS_INLINE_ROUTINE void | _POSIX_Threads_Free (Thread_Control *the_pthread) |
Free POSIX control block. More... | |
RTEMS_INLINE_ROUTINE void | _POSIX_Threads_Initialize_attributes (pthread_attr_t *attr) |
POSIX threads initialize user threads body. More... | |
void | _POSIX_Threads_Sporadic_budget_callout (Thread_Control *the_thread) |
POSIX threads sporadic budget callout. More... | |
void | _POSIX_Threads_Sporadic_budget_TSR (Objects_Id id, void *argument) |
This routine supports the sporadic scheduling algorithm. More... | |
int | _POSIX_Thread_Translate_sched_param (int policy, struct sched_param *param, Thread_CPU_budget_algorithms *budget_algorithm, Thread_CPU_budget_algorithm_callout *budget_callout) |
Translate sched_param into SuperCore terms. More... | |
int | rtems_pthread_attribute_compare (const pthread_attr_t *attr1, const pthread_attr_t *attr2) |
RTEMS_INLINE_ROUTINE Thread_Control * | _POSIX_Threads_Allocate (void) |
RTEMS_INLINE_ROUTINE bool | _POSIX_Threads_Is_null (Thread_Control *the_pthread) |
Variables | |
POSIX_EXTERN Objects_Information | _POSIX_Threads_Information |
The following defines the information control block used to manage this class of objects. | |
pthread_attr_t | _POSIX_Threads_Default_attributes |
This variable contains the default POSIX Thread attributes. | |
void(* | _POSIX_Threads_Initialize_user_threads_p )(void) |
When the user configures a set of POSIX API initialization threads, This variable will point to the method used to initialize them. More... | |
Private Support Information for POSIX Threads.
int _POSIX_Thread_Translate_sched_param | ( | int | policy, |
struct sched_param * | param, | ||
Thread_CPU_budget_algorithms * | budget_algorithm, | ||
Thread_CPU_budget_algorithm_callout * | budget_callout | ||
) |
Translate sched_param into SuperCore terms.
This method translates the POSIX API sched_param into the corresponding SuperCore settings.
[in] | policy | is the POSIX scheduling policy |
[in] | param | points to the scheduling parameter structure |
[in] | budget_algorithm | points to the output CPU Budget algorithm |
[in] | budget_callout | points to the output CPU Callout |
0 | Indicates success. |
error_code | POSIX error code indicating failure. |
References _POSIX_Priority_Is_valid().
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Copy_attributes | ( | pthread_attr_t * | dst_attr, |
const pthread_attr_t * | src_attr | ||
) |
Copy POSIX Thread attribute structure.
This routine copies the attr2 thread attribute structure to the attr1 Thread Attribute structure.
[in] | dst_attr | is a pointer to the thread attribute structure to copy into. |
[out] | src_attr | is a pointer to the thread attribute structure to copy from. |
References _Assert.
Referenced by _POSIX_Threads_Initialize_attributes().
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Free | ( | Thread_Control * | the_pthread | ) |
Free POSIX control block.
This routine frees a pthread control block to the inactive chain of free pthread control blocks.
[in] | the_pthread | is a pointer to the thread to free. |
References _Objects_Free(), and Thread_Control::Object.
RTEMS_INLINE_ROUTINE void _POSIX_Threads_Initialize_attributes | ( | pthread_attr_t * | attr | ) |
POSIX threads initialize user threads body.
This routine initializes the thread attributes structure.
References _POSIX_Threads_Copy_attributes(), and RTEMS_INLINE_ROUTINE.
Referenced by pthread_attr_init().
void _POSIX_Threads_Initialize_user_threads_body | ( | void | ) |
POSIX threads initialize user threads body.
This routine creates and starts all configured user initialization threads.
void _POSIX_Threads_Manager_initialization | ( | void | ) |
POSIX threads manager initialization.
This routine performs the initialization necessary for this manager.
References _Assert, _Objects_Initialize_information(), _POSIX_Threads_Default_attributes, and _POSIX_Threads_Information.
void _POSIX_Threads_Sporadic_budget_callout | ( | Thread_Control * | the_thread | ) |
POSIX threads sporadic budget callout.
This routine handles the sporadic scheduling algorithm.
[in] | the_thread | is a pointer to the thread whose budget has been exceeded. |
References _POSIX_Priority_To_core(), _Thread_Change_priority(), Thread_Control::API_Extensions, Thread_Control::cpu_time_budget, POSIX_API_Control::schedparam, and THREAD_API_POSIX.
void _POSIX_Threads_Sporadic_budget_TSR | ( | Objects_Id | id, |
void * | argument | ||
) |
This routine supports the sporadic scheduling algorithm.
It is scheduled to be executed at the end of each replenishment period. In sporadic scheduling a thread will execute at a high priority for a user specified amount of CPU time. When it exceeds that amount of CPU time, its priority is automatically lowered. This TSR is executed when it is time to replenish the thread's processor budget and raise its priority.
[in] | id | is ignored |
[in] | argument | is a pointer to the Thread_Control structure for the thread being replenished. |
References _POSIX_Priority_To_core(), _Thread_Change_priority(), _Timespec_To_ticks(), Thread_Control::API_Extensions, Thread_Control::cpu_time_budget, POSIX_API_Control::schedparam, and THREAD_API_POSIX.
void(* _POSIX_Threads_Initialize_user_threads_p) (void) |
When the user configures a set of POSIX API initialization threads, This variable will point to the method used to initialize them.
NOTE: It is instantiated and initialized by confdefs.h based upon application requirements.