mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-22 12:08:02 +08:00
2008-08-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libmisc/monitor/monitor.h, rtems/include/rtems/rtems/tasks.h, score/include/rtems/score/thread.h, score/src/threadreset.c, score/src/threadrestart.c, score/src/threadstart.c: New type Thread_Entry_numeric_type for numeric arguments in thread entry functions with at least one numeric argument.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2008-08-04 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* posix/src/mqueuetimedreceive.c, posix/src/mqueuetimedsend.c: Fix
|
||||
warnings.
|
||||
|
||||
2008-08-07 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* score/include/rtems/score/sysstate.h,
|
||||
|
||||
@@ -94,22 +94,22 @@ typedef struct {
|
||||
* Task
|
||||
*/
|
||||
typedef struct {
|
||||
rtems_id id;
|
||||
rtems_name name;
|
||||
rtems_id id;
|
||||
rtems_name name;
|
||||
/* end of common portion */
|
||||
Thread_Entry entry;
|
||||
uint32_t argument;
|
||||
void *stack;
|
||||
uint32_t stack_size;
|
||||
rtems_task_priority priority;
|
||||
States_Control state;
|
||||
rtems_event_set events;
|
||||
rtems_mode modes;
|
||||
rtems_attribute attributes;
|
||||
uint32_t notepad[RTEMS_NUMBER_NOTEPADS];
|
||||
rtems_id wait_id;
|
||||
uint32_t wait_args;
|
||||
uint32_t ticks;
|
||||
Thread_Entry entry;
|
||||
Thread_Entry_numeric_type argument;
|
||||
void *stack;
|
||||
uint32_t stack_size;
|
||||
rtems_task_priority priority;
|
||||
States_Control state;
|
||||
rtems_event_set events;
|
||||
rtems_mode modes;
|
||||
rtems_attribute attributes;
|
||||
uint32_t notepad[RTEMS_NUMBER_NOTEPADS];
|
||||
rtems_id wait_id;
|
||||
uint32_t wait_args;
|
||||
uint32_t ticks;
|
||||
} rtems_monitor_task_t;
|
||||
|
||||
/*
|
||||
|
||||
@@ -166,7 +166,7 @@ typedef void rtems_task;
|
||||
/**
|
||||
* The following defines the argument to an RTEMS task.
|
||||
*/
|
||||
typedef uintptr_t rtems_task_argument;
|
||||
typedef Thread_Entry_numeric_type rtems_task_argument;
|
||||
|
||||
/**
|
||||
* The following defines the type for the entry point of an RTEMS task.
|
||||
|
||||
@@ -77,6 +77,17 @@ extern "C" {
|
||||
*/
|
||||
typedef void *Thread;
|
||||
|
||||
/**
|
||||
* @brief Type of the numeric argument of a thread entry function with at
|
||||
* least one numeric argument.
|
||||
*
|
||||
* This numeric argument type designates an unsigned integer type with the
|
||||
* property that any valid pointer to void can be converted to this type and
|
||||
* then converted back to a pointer to void. The result will compare equal to
|
||||
* the original pointer.
|
||||
*/
|
||||
typedef uintptr_t Thread_Entry_numeric_type;
|
||||
|
||||
/**
|
||||
* The following defines the ways in which the entry point for a
|
||||
* thread can be invoked. Basically, it can be passed any
|
||||
@@ -97,7 +108,7 @@ typedef Thread ( *Thread_Entry )( void ); /* basic 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_numeric )( uint32_t );
|
||||
typedef Thread ( *Thread_Entry_numeric )( Thread_Entry_numeric_type );
|
||||
|
||||
/** This type corresponds to a thread entry point which takes a single
|
||||
* untyped pointer as an argument.
|
||||
@@ -107,13 +118,13 @@ typedef Thread ( *Thread_Entry_pointer )( void * );
|
||||
/** 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_pointer_first )( void *, uint32_t );
|
||||
typedef Thread ( *Thread_Entry_both_pointer_first )( void *, Thread_Entry_numeric_type );
|
||||
|
||||
/** 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 Thread ( *Thread_Entry_both_numeric_first )( uint32_t , void * );
|
||||
typedef Thread ( *Thread_Entry_both_numeric_first )( Thread_Entry_numeric_type, void * );
|
||||
|
||||
/**
|
||||
* The following lists the algorithms used to manage the thread cpu budget.
|
||||
@@ -169,39 +180,39 @@ typedef struct {
|
||||
*/
|
||||
typedef struct {
|
||||
/** This field is the starting address for the thread. */
|
||||
Thread_Entry entry_point;
|
||||
Thread_Entry entry_point;
|
||||
/** This field indicates the how task is invoked. */
|
||||
Thread_Start_types prototype;
|
||||
Thread_Start_types prototype;
|
||||
/** This field is the pointer argument passed at thread start. */
|
||||
void *pointer_argument;
|
||||
void *pointer_argument;
|
||||
/** This field is the numeric argument passed at thread start. */
|
||||
uint32_t numeric_argument;
|
||||
Thread_Entry_numeric_type numeric_argument;
|
||||
/*-------------- initial execution modes ----------------- */
|
||||
/** This field indicates whether the thread was preemptible when
|
||||
* it started.
|
||||
*/
|
||||
boolean is_preemptible;
|
||||
boolean is_preemptible;
|
||||
/** This field indicates the CPU budget algorith. */
|
||||
Thread_CPU_budget_algorithms budget_algorithm;
|
||||
Thread_CPU_budget_algorithms budget_algorithm;
|
||||
/** This field is the routine to invoke when the CPU allotment is
|
||||
* consumed.
|
||||
*/
|
||||
Thread_CPU_budget_algorithm_callout budget_callout;
|
||||
Thread_CPU_budget_algorithm_callout budget_callout;
|
||||
/** This field is the initial ISR disable level of this thread. */
|
||||
uint32_t isr_level;
|
||||
uint32_t isr_level;
|
||||
/** This field is the initial priority. */
|
||||
Priority_Control initial_priority;
|
||||
Priority_Control initial_priority;
|
||||
/** This field indicates whether the SuperCore allocated the stack. */
|
||||
boolean core_allocated_stack;
|
||||
boolean core_allocated_stack;
|
||||
/** This field is the stack information. */
|
||||
Stack_Control Initial_stack;
|
||||
Stack_Control Initial_stack;
|
||||
#if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE )
|
||||
/** This field is the initial FP context area address. */
|
||||
Context_Control_fp *fp_context;
|
||||
Context_Control_fp *fp_context;
|
||||
#endif
|
||||
/** This field is the initial stack area address. */
|
||||
void *stack;
|
||||
} Thread_Start_information;
|
||||
void *stack;
|
||||
} Thread_Start_information;
|
||||
|
||||
/**
|
||||
* The following structure contains the information necessary to manage
|
||||
@@ -579,11 +590,11 @@ boolean _Thread_Initialize(
|
||||
* thread competes with all other threads for CPU time.
|
||||
*/
|
||||
boolean _Thread_Start(
|
||||
Thread_Control *the_thread,
|
||||
Thread_Start_types the_prototype,
|
||||
void *entry_point,
|
||||
void *pointer_argument,
|
||||
uint32_t numeric_argument
|
||||
Thread_Control *the_thread,
|
||||
Thread_Start_types the_prototype,
|
||||
void *entry_point,
|
||||
void *pointer_argument,
|
||||
Thread_Entry_numeric_type numeric_argument
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -594,9 +605,9 @@ boolean _Thread_Start(
|
||||
* TODO: multiple task arg profiles
|
||||
*/
|
||||
boolean _Thread_Restart(
|
||||
Thread_Control *the_thread,
|
||||
void *pointer_argument,
|
||||
uint32_t numeric_argument
|
||||
Thread_Control *the_thread,
|
||||
void *pointer_argument,
|
||||
Thread_Entry_numeric_type numeric_argument
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -604,9 +615,9 @@ boolean _Thread_Restart(
|
||||
* not restart it.
|
||||
*/
|
||||
void _Thread_Reset(
|
||||
Thread_Control *the_thread,
|
||||
void *pointer_argument,
|
||||
uint32_t numeric_argument
|
||||
Thread_Control *the_thread,
|
||||
void *pointer_argument,
|
||||
Thread_Entry_numeric_type numeric_argument
|
||||
);
|
||||
|
||||
/**
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
*/
|
||||
|
||||
void _Thread_Reset(
|
||||
Thread_Control *the_thread,
|
||||
void *pointer_argument,
|
||||
uint32_t numeric_argument
|
||||
Thread_Control *the_thread,
|
||||
void *pointer_argument,
|
||||
Thread_Entry_numeric_type numeric_argument
|
||||
)
|
||||
{
|
||||
the_thread->resource_count = 0;
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
*/
|
||||
|
||||
boolean _Thread_Restart(
|
||||
Thread_Control *the_thread,
|
||||
void *pointer_argument,
|
||||
uint32_t numeric_argument
|
||||
Thread_Control *the_thread,
|
||||
void *pointer_argument,
|
||||
Thread_Entry_numeric_type numeric_argument
|
||||
)
|
||||
{
|
||||
if ( !_States_Is_dormant( the_thread->current_state ) ) {
|
||||
|
||||
@@ -41,11 +41,11 @@
|
||||
*/
|
||||
|
||||
boolean _Thread_Start(
|
||||
Thread_Control *the_thread,
|
||||
Thread_Start_types the_prototype,
|
||||
void *entry_point,
|
||||
void *pointer_argument,
|
||||
uint32_t numeric_argument
|
||||
Thread_Control *the_thread,
|
||||
Thread_Start_types the_prototype,
|
||||
void *entry_point,
|
||||
void *pointer_argument,
|
||||
Thread_Entry_numeric_type numeric_argument
|
||||
)
|
||||
{
|
||||
if ( _States_Is_dormant( the_thread->current_state ) ) {
|
||||
|
||||
Reference in New Issue
Block a user