forked from Imagelibrary/rtems
Moved _Thread_Information -> _RTEMS_tasks_Information.
Added a table of object information control blocks. Modified _Thread_Get so it looks up a thread regardless of which thread management "entity" (manager, internal, etc) actually "owns" it.
This commit is contained in:
@@ -61,6 +61,25 @@ extern "C" {
|
|||||||
|
|
||||||
#define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
|
#define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following defines the information control block used to
|
||||||
|
* manage this class of objects.
|
||||||
|
*/
|
||||||
|
|
||||||
|
EXTERN Objects_Information _RTEMS_tasks_Information;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _RTEMS_tasks_Manager_initialization
|
||||||
|
*
|
||||||
|
* DESCRIPTION:
|
||||||
|
*
|
||||||
|
* This routine initializes all Task Manager related data structures.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _RTEMS_tasks_Manager_initialization(
|
||||||
|
unsigned32 maximum_tasks
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rtems_task_create
|
* rtems_task_create
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -61,6 +61,25 @@ extern "C" {
|
|||||||
|
|
||||||
#define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
|
#define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following defines the information control block used to
|
||||||
|
* manage this class of objects.
|
||||||
|
*/
|
||||||
|
|
||||||
|
EXTERN Objects_Information _RTEMS_tasks_Information;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _RTEMS_tasks_Manager_initialization
|
||||||
|
*
|
||||||
|
* DESCRIPTION:
|
||||||
|
*
|
||||||
|
* This routine initializes all Task Manager related data structures.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _RTEMS_tasks_Manager_initialization(
|
||||||
|
unsigned32 maximum_tasks
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rtems_task_create
|
* rtems_task_create
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
|
STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
|
||||||
{
|
{
|
||||||
return (Thread_Control *) _Objects_Allocate( &_Thread_Information );
|
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -43,7 +43,7 @@ STATIC INLINE void _RTEMS_tasks_Free (
|
|||||||
Thread_Control *the_task
|
Thread_Control *the_task
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_Objects_Free( &_Thread_Information, &the_task->Object );
|
_Objects_Free( &_RTEMS_tasks_Information, &the_task->Object );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
|
STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
|
||||||
{
|
{
|
||||||
return (Thread_Control *) _Objects_Allocate( &_Thread_Information );
|
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -43,7 +43,7 @@ STATIC INLINE void _RTEMS_tasks_Free (
|
|||||||
Thread_Control *the_task
|
Thread_Control *the_task
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_Objects_Free( &_Thread_Information, &the_task->Object );
|
_Objects_Free( &_RTEMS_tasks_Information, &the_task->Object );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define _RTEMS_tasks_Allocate() \
|
#define _RTEMS_tasks_Allocate() \
|
||||||
(Thread_Control *) _Objects_Allocate( &_Thread_Information )
|
(Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information )
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define _RTEMS_tasks_Free( _the_task ) \
|
#define _RTEMS_tasks_Free( _the_task ) \
|
||||||
_Objects_Free( &_Thread_Information, &(_the_task)->Object )
|
_Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object )
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define _RTEMS_tasks_Allocate() \
|
#define _RTEMS_tasks_Allocate() \
|
||||||
(Thread_Control *) _Objects_Allocate( &_Thread_Information )
|
(Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information )
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define _RTEMS_tasks_Free( _the_task ) \
|
#define _RTEMS_tasks_Free( _the_task ) \
|
||||||
_Objects_Free( &_Thread_Information, &(_the_task)->Object )
|
_Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object )
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ void _Dual_ported_memory_Manager_initialization(
|
|||||||
maximum_ports,
|
maximum_ports,
|
||||||
sizeof( Dual_ported_memory_Control ),
|
sizeof( Dual_ported_memory_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ void _Message_queue_Manager_initialization(
|
|||||||
maximum_message_queues,
|
maximum_message_queues,
|
||||||
sizeof( Message_queue_Control ),
|
sizeof( Message_queue_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ void _Partition_Manager_initialization(
|
|||||||
maximum_partitions,
|
maximum_partitions,
|
||||||
sizeof( Partition_Control ),
|
sizeof( Partition_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ void _Rate_monotonic_Manager_initialization(
|
|||||||
maximum_periods,
|
maximum_periods,
|
||||||
sizeof( Rate_monotonic_Control ),
|
sizeof( Rate_monotonic_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ void _Region_Manager_initialization(
|
|||||||
maximum_regions,
|
maximum_regions,
|
||||||
sizeof( Region_Control ),
|
sizeof( Region_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ void _Timer_Manager_initialization(
|
|||||||
maximum_timers,
|
maximum_timers,
|
||||||
sizeof( Timer_Control ),
|
sizeof( Timer_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ void _Semaphore_Manager_initialization(
|
|||||||
maximum_semaphores,
|
maximum_semaphores,
|
||||||
sizeof( Semaphore_Control ),
|
sizeof( Semaphore_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ void _RTEMS_tasks_MP_Process_packet (
|
|||||||
case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
|
case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
|
||||||
|
|
||||||
ignored = _Objects_MP_Open(
|
ignored = _Objects_MP_Open(
|
||||||
&_Thread_Information,
|
&_RTEMS_tasks_Information,
|
||||||
the_packet->name,
|
the_packet->name,
|
||||||
the_packet->Prefix.id,
|
the_packet->Prefix.id,
|
||||||
TRUE
|
TRUE
|
||||||
@@ -205,7 +205,7 @@ void _RTEMS_tasks_MP_Process_packet (
|
|||||||
|
|
||||||
case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
|
case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
|
||||||
|
|
||||||
_Objects_MP_Close( &_Thread_Information, the_packet->Prefix.id );
|
_Objects_MP_Close( &_RTEMS_tasks_Information, the_packet->Prefix.id );
|
||||||
|
|
||||||
_MPCI_Return_packet( the_packet_prefix );
|
_MPCI_Return_packet( the_packet_prefix );
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -26,6 +26,34 @@
|
|||||||
#include <rtems/userext.h>
|
#include <rtems/userext.h>
|
||||||
#include <rtems/wkspace.h>
|
#include <rtems/wkspace.h>
|
||||||
|
|
||||||
|
/*PAGE
|
||||||
|
*
|
||||||
|
* _RTEMS_tasks_Manager_initialization
|
||||||
|
*
|
||||||
|
* This routine initializes all Task Manager related data structures.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* maximum_tasks - number of tasks to initialize
|
||||||
|
*
|
||||||
|
* Output parameters: NONE
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _RTEMS_tasks_Manager_initialization(
|
||||||
|
unsigned32 maximum_tasks
|
||||||
|
)
|
||||||
|
{
|
||||||
|
_Objects_Initialize_information(
|
||||||
|
&_RTEMS_tasks_Information,
|
||||||
|
OBJECTS_RTEMS_TASKS,
|
||||||
|
TRUE,
|
||||||
|
maximum_tasks,
|
||||||
|
sizeof( Thread_Control ),
|
||||||
|
FALSE,
|
||||||
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
TRUE
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
* rtems_task_create
|
* rtems_task_create
|
||||||
@@ -136,7 +164,7 @@ rtems_status_code rtems_task_create(
|
|||||||
the_thread->Start.fp_context = the_thread->fp_context;
|
the_thread->Start.fp_context = the_thread->fp_context;
|
||||||
|
|
||||||
if ( _Attributes_Is_global( the_attribute_set ) &&
|
if ( _Attributes_Is_global( the_attribute_set ) &&
|
||||||
!( _Objects_MP_Open( &_Thread_Information, name,
|
!( _Objects_MP_Open( &_RTEMS_tasks_Information, name,
|
||||||
the_thread->Object.id, FALSE ) ) ) {
|
the_thread->Object.id, FALSE ) ) ) {
|
||||||
_RTEMS_tasks_Free( the_thread );
|
_RTEMS_tasks_Free( the_thread );
|
||||||
(void) _Workspace_Free( memory );
|
(void) _Workspace_Free( memory );
|
||||||
@@ -157,7 +185,7 @@ rtems_status_code rtems_task_create(
|
|||||||
|
|
||||||
_ASR_Initialize( &the_thread->Signal );
|
_ASR_Initialize( &the_thread->Signal );
|
||||||
|
|
||||||
_Objects_Open( &_Thread_Information, &the_thread->Object, &name );
|
_Objects_Open( &_RTEMS_tasks_Information, &the_thread->Object, &name );
|
||||||
|
|
||||||
*id = the_thread->Object.id;
|
*id = the_thread->Object.id;
|
||||||
|
|
||||||
@@ -199,7 +227,7 @@ rtems_status_code rtems_task_ident(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( name != OBJECTS_ID_OF_SELF )
|
if ( name != OBJECTS_ID_OF_SELF )
|
||||||
return( _Objects_Name_to_id( &_Thread_Information, &name, node, id ) );
|
return( _Objects_Name_to_id( &_RTEMS_tasks_Information, &name, node, id ) );
|
||||||
|
|
||||||
*id = _Thread_Executing->Object.id;
|
*id = _Thread_Executing->Object.id;
|
||||||
return( RTEMS_SUCCESSFUL );
|
return( RTEMS_SUCCESSFUL );
|
||||||
@@ -368,7 +396,7 @@ rtems_status_code rtems_task_delete(
|
|||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
|
return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_Objects_Close( &_Thread_Information, &the_thread->Object );
|
_Objects_Close( &_RTEMS_tasks_Information, &the_thread->Object );
|
||||||
|
|
||||||
_Thread_Set_state( the_thread, STATES_TRANSIENT );
|
_Thread_Set_state( the_thread, STATES_TRANSIENT );
|
||||||
|
|
||||||
@@ -388,7 +416,7 @@ rtems_status_code rtems_task_delete(
|
|||||||
|
|
||||||
if ( _Attributes_Is_global( the_thread->attribute_set ) ) {
|
if ( _Attributes_Is_global( the_thread->attribute_set ) ) {
|
||||||
|
|
||||||
_Objects_MP_Close( &_Thread_Information, the_thread->Object.id );
|
_Objects_MP_Close( &_RTEMS_tasks_Information, the_thread->Object.id );
|
||||||
|
|
||||||
_RTEMS_tasks_MP_Send_process_packet(
|
_RTEMS_tasks_MP_Send_process_packet(
|
||||||
RTEMS_TASKS_MP_ANNOUNCE_DELETE,
|
RTEMS_TASKS_MP_ANNOUNCE_DELETE,
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ void _Timer_Manager_initialization(
|
|||||||
maximum_timers,
|
maximum_timers,
|
||||||
sizeof( Timer_Control ),
|
sizeof( Timer_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
_TOD_Handler_initialization( configuration_table->microseconds_per_tick );
|
_TOD_Handler_initialization( configuration_table->microseconds_per_tick );
|
||||||
|
|
||||||
_Thread_Handler_initialization(
|
_Thread_Handler_initialization(
|
||||||
configuration_table->maximum_tasks,
|
|
||||||
configuration_table->ticks_per_timeslice,
|
configuration_table->ticks_per_timeslice,
|
||||||
multiprocessing_table->maximum_proxies
|
multiprocessing_table->maximum_proxies
|
||||||
);
|
);
|
||||||
@@ -165,6 +164,8 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
|
|
||||||
_Multiprocessing_Manager_initialization();
|
_Multiprocessing_Manager_initialization();
|
||||||
|
|
||||||
|
_RTEMS_tasks_Manager_initialization( configuration_table->maximum_tasks );
|
||||||
|
|
||||||
_Timer_Manager_initialization( configuration_table->maximum_timers );
|
_Timer_Manager_initialization( configuration_table->maximum_timers );
|
||||||
|
|
||||||
_Extension_Manager_initialization( configuration_table->maximum_extensions );
|
_Extension_Manager_initialization( configuration_table->maximum_extensions );
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ void _Extension_Manager_initialization(
|
|||||||
maximum_extensions,
|
maximum_extensions,
|
||||||
sizeof( Extension_Control ),
|
sizeof( Extension_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,17 +78,21 @@ typedef unsigned32 Objects_Id;
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OBJECTS_NO_CLASS = 0,
|
OBJECTS_NO_CLASS = 0,
|
||||||
OBJECTS_RTEMS_TASKS = 1,
|
OBJECTS_INTERNAL_THREADS = 1,
|
||||||
OBJECTS_RTEMS_TIMERS = 2,
|
OBJECTS_RTEMS_TASKS = 2,
|
||||||
OBJECTS_RTEMS_SEMAPHORES = 3,
|
OBJECTS_RTEMS_TIMERS = 3,
|
||||||
OBJECTS_RTEMS_MESSAGE_QUEUES = 4,
|
OBJECTS_RTEMS_SEMAPHORES = 4,
|
||||||
OBJECTS_RTEMS_PARTITIONS = 5,
|
OBJECTS_RTEMS_MESSAGE_QUEUES = 5,
|
||||||
OBJECTS_RTEMS_REGIONS = 6,
|
OBJECTS_RTEMS_PARTITIONS = 6,
|
||||||
OBJECTS_RTEMS_PORTS = 7,
|
OBJECTS_RTEMS_REGIONS = 7,
|
||||||
OBJECTS_RTEMS_PERIODS = 8,
|
OBJECTS_RTEMS_PORTS = 8,
|
||||||
OBJECTS_RTEMS_EXTENSIONS = 9
|
OBJECTS_RTEMS_PERIODS = 9,
|
||||||
|
OBJECTS_RTEMS_EXTENSIONS = 10
|
||||||
} Objects_Classes;
|
} Objects_Classes;
|
||||||
|
|
||||||
|
#define OBJECTS_CLASSES_FIRST OBJECTS_NO_CLASS
|
||||||
|
#define OBJECTS_CLASSES_LAST OBJECTS_RTEMS_EXTENSIONS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This enumerated type lists the locations which may be returned
|
* This enumerated type lists the locations which may be returned
|
||||||
* by _Objects_Get. These codes indicate the success of locating
|
* by _Objects_Get. These codes indicate the success of locating
|
||||||
@@ -128,6 +132,8 @@ typedef struct {
|
|||||||
Chain_Control Inactive; /* chain of inactive ctl blocks */
|
Chain_Control Inactive; /* chain of inactive ctl blocks */
|
||||||
boolean is_string; /* TRUE if names are strings */
|
boolean is_string; /* TRUE if names are strings */
|
||||||
unsigned32 name_length; /* maximum length of names */
|
unsigned32 name_length; /* maximum length of names */
|
||||||
|
boolean is_thread; /* TRUE if these are threads */
|
||||||
|
/* irregardless of API */
|
||||||
} Objects_Information;
|
} Objects_Information;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -137,6 +143,15 @@ typedef struct {
|
|||||||
|
|
||||||
EXTERN unsigned32 _Objects_Local_node;
|
EXTERN unsigned32 _Objects_Local_node;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following is the list of information blocks for each object
|
||||||
|
* class. From the ID, we can go to one of these information blocks,
|
||||||
|
* and obtain a pointer to the appropriate object control block.
|
||||||
|
*/
|
||||||
|
|
||||||
|
EXTERN Objects_Information
|
||||||
|
*_Objects_Information_table[OBJECTS_CLASSES_LAST + 1];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following defines the constant which may be used
|
* The following defines the constant which may be used
|
||||||
* with _Objects_Get to manipulate the calling task.
|
* with _Objects_Get to manipulate the calling task.
|
||||||
@@ -201,7 +216,8 @@ void _Objects_Initialize_information (
|
|||||||
unsigned32 maximum,
|
unsigned32 maximum,
|
||||||
unsigned32 size,
|
unsigned32 size,
|
||||||
boolean is_string,
|
boolean is_string,
|
||||||
unsigned32 maximum_name_length
|
unsigned32 maximum_name_length,
|
||||||
|
boolean is_task
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -228,13 +228,6 @@ EXTERN Thread_Control *_Thread_Heir;
|
|||||||
|
|
||||||
EXTERN Thread_Control *_Thread_Allocated_fp;
|
EXTERN Thread_Control *_Thread_Allocated_fp;
|
||||||
|
|
||||||
/*
|
|
||||||
* The following defines the information control block used to
|
|
||||||
* manage this class of objects.
|
|
||||||
*/
|
|
||||||
|
|
||||||
EXTERN Objects_Information _Thread_Information;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following context area contains the context of the "thread"
|
* The following context area contains the context of the "thread"
|
||||||
* which invoked rtems_initialize_executive. This context is restored
|
* which invoked rtems_initialize_executive. This context is restored
|
||||||
@@ -254,7 +247,6 @@ EXTERN Context_Control _Thread_BSP_context;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void _Thread_Handler_initialization (
|
void _Thread_Handler_initialization (
|
||||||
unsigned32 maximum_tasks,
|
|
||||||
unsigned32 ticks_per_timeslice,
|
unsigned32 ticks_per_timeslice,
|
||||||
unsigned32 maximum_proxies
|
unsigned32 maximum_proxies
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -78,17 +78,21 @@ typedef unsigned32 Objects_Id;
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OBJECTS_NO_CLASS = 0,
|
OBJECTS_NO_CLASS = 0,
|
||||||
OBJECTS_RTEMS_TASKS = 1,
|
OBJECTS_INTERNAL_THREADS = 1,
|
||||||
OBJECTS_RTEMS_TIMERS = 2,
|
OBJECTS_RTEMS_TASKS = 2,
|
||||||
OBJECTS_RTEMS_SEMAPHORES = 3,
|
OBJECTS_RTEMS_TIMERS = 3,
|
||||||
OBJECTS_RTEMS_MESSAGE_QUEUES = 4,
|
OBJECTS_RTEMS_SEMAPHORES = 4,
|
||||||
OBJECTS_RTEMS_PARTITIONS = 5,
|
OBJECTS_RTEMS_MESSAGE_QUEUES = 5,
|
||||||
OBJECTS_RTEMS_REGIONS = 6,
|
OBJECTS_RTEMS_PARTITIONS = 6,
|
||||||
OBJECTS_RTEMS_PORTS = 7,
|
OBJECTS_RTEMS_REGIONS = 7,
|
||||||
OBJECTS_RTEMS_PERIODS = 8,
|
OBJECTS_RTEMS_PORTS = 8,
|
||||||
OBJECTS_RTEMS_EXTENSIONS = 9
|
OBJECTS_RTEMS_PERIODS = 9,
|
||||||
|
OBJECTS_RTEMS_EXTENSIONS = 10
|
||||||
} Objects_Classes;
|
} Objects_Classes;
|
||||||
|
|
||||||
|
#define OBJECTS_CLASSES_FIRST OBJECTS_NO_CLASS
|
||||||
|
#define OBJECTS_CLASSES_LAST OBJECTS_RTEMS_EXTENSIONS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This enumerated type lists the locations which may be returned
|
* This enumerated type lists the locations which may be returned
|
||||||
* by _Objects_Get. These codes indicate the success of locating
|
* by _Objects_Get. These codes indicate the success of locating
|
||||||
@@ -128,6 +132,8 @@ typedef struct {
|
|||||||
Chain_Control Inactive; /* chain of inactive ctl blocks */
|
Chain_Control Inactive; /* chain of inactive ctl blocks */
|
||||||
boolean is_string; /* TRUE if names are strings */
|
boolean is_string; /* TRUE if names are strings */
|
||||||
unsigned32 name_length; /* maximum length of names */
|
unsigned32 name_length; /* maximum length of names */
|
||||||
|
boolean is_thread; /* TRUE if these are threads */
|
||||||
|
/* irregardless of API */
|
||||||
} Objects_Information;
|
} Objects_Information;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -137,6 +143,15 @@ typedef struct {
|
|||||||
|
|
||||||
EXTERN unsigned32 _Objects_Local_node;
|
EXTERN unsigned32 _Objects_Local_node;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following is the list of information blocks for each object
|
||||||
|
* class. From the ID, we can go to one of these information blocks,
|
||||||
|
* and obtain a pointer to the appropriate object control block.
|
||||||
|
*/
|
||||||
|
|
||||||
|
EXTERN Objects_Information
|
||||||
|
*_Objects_Information_table[OBJECTS_CLASSES_LAST + 1];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following defines the constant which may be used
|
* The following defines the constant which may be used
|
||||||
* with _Objects_Get to manipulate the calling task.
|
* with _Objects_Get to manipulate the calling task.
|
||||||
@@ -201,7 +216,8 @@ void _Objects_Initialize_information (
|
|||||||
unsigned32 maximum,
|
unsigned32 maximum,
|
||||||
unsigned32 size,
|
unsigned32 size,
|
||||||
boolean is_string,
|
boolean is_string,
|
||||||
unsigned32 maximum_name_length
|
unsigned32 maximum_name_length,
|
||||||
|
boolean is_task
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -228,13 +228,6 @@ EXTERN Thread_Control *_Thread_Heir;
|
|||||||
|
|
||||||
EXTERN Thread_Control *_Thread_Allocated_fp;
|
EXTERN Thread_Control *_Thread_Allocated_fp;
|
||||||
|
|
||||||
/*
|
|
||||||
* The following defines the information control block used to
|
|
||||||
* manage this class of objects.
|
|
||||||
*/
|
|
||||||
|
|
||||||
EXTERN Objects_Information _Thread_Information;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following context area contains the context of the "thread"
|
* The following context area contains the context of the "thread"
|
||||||
* which invoked rtems_initialize_executive. This context is restored
|
* which invoked rtems_initialize_executive. This context is restored
|
||||||
@@ -254,7 +247,6 @@ EXTERN Context_Control _Thread_BSP_context;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void _Thread_Handler_initialization (
|
void _Thread_Handler_initialization (
|
||||||
unsigned32 maximum_tasks,
|
|
||||||
unsigned32 ticks_per_timeslice,
|
unsigned32 ticks_per_timeslice,
|
||||||
unsigned32 maximum_proxies
|
unsigned32 maximum_proxies
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ STATIC INLINE boolean _Thread_Is_null (
|
|||||||
*
|
*
|
||||||
* _Thread_Get
|
* _Thread_Get
|
||||||
*
|
*
|
||||||
|
* NOTE: XXX... This routine may be able to be optimized.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
STATIC INLINE Thread_Control *_Thread_Get (
|
STATIC INLINE Thread_Control *_Thread_Get (
|
||||||
@@ -238,14 +239,30 @@ STATIC INLINE Thread_Control *_Thread_Get (
|
|||||||
Objects_Locations *location
|
Objects_Locations *location
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Objects_Classes the_class;
|
||||||
|
Objects_Information *information;
|
||||||
|
|
||||||
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
||||||
_Thread_Disable_dispatch();
|
_Thread_Disable_dispatch();
|
||||||
*location = OBJECTS_LOCAL;
|
*location = OBJECTS_LOCAL;
|
||||||
return( _Thread_Executing );
|
return( _Thread_Executing );
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Thread_Control *)
|
the_class = rtems_get_class( id );
|
||||||
_Objects_Get( &_Thread_Information, id, location );
|
|
||||||
|
if ( the_class > OBJECTS_CLASSES_LAST ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
information = _Objects_Information_table[ the_class ];
|
||||||
|
|
||||||
|
if ( !information || !information->is_thread ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (Thread_Control *) _Objects_Get( information, id, location );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ STATIC INLINE boolean _Thread_Is_null (
|
|||||||
*
|
*
|
||||||
* _Thread_Get
|
* _Thread_Get
|
||||||
*
|
*
|
||||||
|
* NOTE: XXX... This routine may be able to be optimized.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
STATIC INLINE Thread_Control *_Thread_Get (
|
STATIC INLINE Thread_Control *_Thread_Get (
|
||||||
@@ -238,14 +239,30 @@ STATIC INLINE Thread_Control *_Thread_Get (
|
|||||||
Objects_Locations *location
|
Objects_Locations *location
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Objects_Classes the_class;
|
||||||
|
Objects_Information *information;
|
||||||
|
|
||||||
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
||||||
_Thread_Disable_dispatch();
|
_Thread_Disable_dispatch();
|
||||||
*location = OBJECTS_LOCAL;
|
*location = OBJECTS_LOCAL;
|
||||||
return( _Thread_Executing );
|
return( _Thread_Executing );
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Thread_Control *)
|
the_class = rtems_get_class( id );
|
||||||
_Objects_Get( &_Thread_Information, id, location );
|
|
||||||
|
if ( the_class > OBJECTS_CLASSES_LAST ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
information = _Objects_Information_table[ the_class ];
|
||||||
|
|
||||||
|
if ( !information || !information->is_thread ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (Thread_Control *) _Objects_Get( information, id, location );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ void _Objects_Initialize_information(
|
|||||||
unsigned32 maximum,
|
unsigned32 maximum,
|
||||||
unsigned32 size,
|
unsigned32 size,
|
||||||
boolean is_string,
|
boolean is_string,
|
||||||
unsigned32 maximum_name_length
|
unsigned32 maximum_name_length,
|
||||||
|
boolean is_thread
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
unsigned32 minimum_index;
|
unsigned32 minimum_index;
|
||||||
@@ -80,6 +81,13 @@ void _Objects_Initialize_information(
|
|||||||
information->maximum = maximum;
|
information->maximum = maximum;
|
||||||
information->the_class = the_class;
|
information->the_class = the_class;
|
||||||
information->is_string = is_string;
|
information->is_string = is_string;
|
||||||
|
information->is_thread = is_thread;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the entry in the object information table.
|
||||||
|
*/
|
||||||
|
|
||||||
|
_Objects_Information_table[ the_class ] = information;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate minimum and maximum Id's
|
* Calculate minimum and maximum Id's
|
||||||
|
|||||||
@@ -35,14 +35,13 @@
|
|||||||
* This routine initializes all thread manager related data structures.
|
* This routine initializes all thread manager related data structures.
|
||||||
*
|
*
|
||||||
* Input parameters:
|
* Input parameters:
|
||||||
* maximum_tasks - number of tasks to initialize
|
|
||||||
* ticks_per_timeslice - clock ticks per quantum
|
* ticks_per_timeslice - clock ticks per quantum
|
||||||
|
* maximum_proxies - number of proxies to initialize
|
||||||
*
|
*
|
||||||
* Output parameters: NONE
|
* Output parameters: NONE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void _Thread_Handler_initialization(
|
void _Thread_Handler_initialization(
|
||||||
unsigned32 maximum_tasks,
|
|
||||||
unsigned32 ticks_per_timeslice,
|
unsigned32 ticks_per_timeslice,
|
||||||
unsigned32 maximum_proxies
|
unsigned32 maximum_proxies
|
||||||
)
|
)
|
||||||
@@ -57,16 +56,6 @@ void _Thread_Handler_initialization(
|
|||||||
_Thread_Ticks_remaining_in_timeslice = ticks_per_timeslice;
|
_Thread_Ticks_remaining_in_timeslice = ticks_per_timeslice;
|
||||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||||
|
|
||||||
_Objects_Initialize_information(
|
|
||||||
&_Thread_Information,
|
|
||||||
OBJECTS_RTEMS_TASKS,
|
|
||||||
TRUE,
|
|
||||||
maximum_tasks,
|
|
||||||
sizeof( Thread_Control ),
|
|
||||||
FALSE,
|
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
|
||||||
);
|
|
||||||
|
|
||||||
_Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
|
_Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
|
||||||
(RTEMS_MAXIMUM_PRIORITY + 1) * sizeof(Chain_Control)
|
(RTEMS_MAXIMUM_PRIORITY + 1) * sizeof(Chain_Control)
|
||||||
);
|
);
|
||||||
@@ -789,6 +778,8 @@ boolean _Thread_Change_mode(
|
|||||||
*
|
*
|
||||||
* NOTE: If we are not using static inlines, this must be a real
|
* NOTE: If we are not using static inlines, this must be a real
|
||||||
* subroutine call.
|
* subroutine call.
|
||||||
|
*
|
||||||
|
* NOTE: XXX... This routine may be able to be optimized.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef USE_INLINES
|
#ifndef USE_INLINES
|
||||||
@@ -798,13 +789,29 @@ STATIC INLINE Thread_Control *_Thread_Get (
|
|||||||
Objects_Locations *location
|
Objects_Locations *location
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Objects_Classes the_class;
|
||||||
|
Objects_Information *information;
|
||||||
|
|
||||||
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
||||||
_Thread_Disable_dispatch();
|
_Thread_Disable_dispatch();
|
||||||
*location = OBJECTS_LOCAL;
|
*location = OBJECTS_LOCAL;
|
||||||
return( _Thread_Executing );
|
return( _Thread_Executing );
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Thread_Control *) _Objects_Get( &_Thread_Information, id, location );
|
the_class = rtems_get_class( id );
|
||||||
|
|
||||||
|
if ( the_class > OBJECTS_CLASSES_LAST ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
information = _Objects_Information_table[ the_class ];
|
||||||
|
|
||||||
|
if ( !information || !information->is_thread ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (Thread_Control *) _Objects_Get( information, id, location );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ rtems_monitor_object_info_t rtems_monitor_object_info[] =
|
|||||||
(rtems_monitor_object_dump_fn) rtems_monitor_init_task_dump,
|
(rtems_monitor_object_dump_fn) rtems_monitor_init_task_dump,
|
||||||
},
|
},
|
||||||
{ RTEMS_OBJECT_TASK,
|
{ RTEMS_OBJECT_TASK,
|
||||||
(void *) &_Thread_Information,
|
(void *) &_RTEMS_tasks_Information,
|
||||||
sizeof(rtems_monitor_task_t),
|
sizeof(rtems_monitor_task_t),
|
||||||
(rtems_monitor_object_next_fn) rtems_monitor_manager_next,
|
(rtems_monitor_object_next_fn) rtems_monitor_manager_next,
|
||||||
(rtems_monitor_object_canonical_fn) rtems_monitor_task_canonical,
|
(rtems_monitor_object_canonical_fn) rtems_monitor_task_canonical,
|
||||||
|
|||||||
@@ -416,8 +416,10 @@ void Stack_check_Fatal_extension( unsigned32 status )
|
|||||||
void Stack_check_Dump_usage( void )
|
void Stack_check_Dump_usage( void )
|
||||||
{
|
{
|
||||||
unsigned32 i;
|
unsigned32 i;
|
||||||
|
unsigned32 class_index;
|
||||||
Thread_Control *the_thread;
|
Thread_Control *the_thread;
|
||||||
unsigned32 hit_running = 0;
|
unsigned32 hit_running = 0;
|
||||||
|
Objects_Information *information;
|
||||||
|
|
||||||
if (stack_check_initialized == 0)
|
if (stack_check_initialized == 0)
|
||||||
return;
|
return;
|
||||||
@@ -425,12 +427,20 @@ void Stack_check_Dump_usage( void )
|
|||||||
printf(
|
printf(
|
||||||
" ID NAME LOW HIGH AVAILABLE USED\n"
|
" ID NAME LOW HIGH AVAILABLE USED\n"
|
||||||
);
|
);
|
||||||
for ( i=1 ; i<_Thread_Information.maximum ; i++ ) {
|
|
||||||
the_thread = (Thread_Control *)_Thread_Information.local_table[ i ];
|
for ( class_index = OBJECTS_CLASSES_FIRST ;
|
||||||
|
class_index <= OBJECTS_CLASSES_LAST ;
|
||||||
|
class_index++ ) {
|
||||||
|
information = _Objects_Information_table[ class_index ];
|
||||||
|
if ( information && information->is_thread ) {
|
||||||
|
for ( i=1 ; i < information->maximum ; i++ ) {
|
||||||
|
the_thread = (Thread_Control *)information->local_table[ i ];
|
||||||
Stack_check_Dump_threads_usage( the_thread );
|
Stack_check_Dump_threads_usage( the_thread );
|
||||||
if ( the_thread == _Thread_Executing )
|
if ( the_thread == _Thread_Executing )
|
||||||
hit_running = 1;
|
hit_running = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( !hit_running )
|
if ( !hit_running )
|
||||||
Stack_check_Dump_threads_usage( _Thread_Executing );
|
Stack_check_Dump_threads_usage( _Thread_Executing );
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ rtems_monitor_object_info_t rtems_monitor_object_info[] =
|
|||||||
(rtems_monitor_object_dump_fn) rtems_monitor_init_task_dump,
|
(rtems_monitor_object_dump_fn) rtems_monitor_init_task_dump,
|
||||||
},
|
},
|
||||||
{ RTEMS_OBJECT_TASK,
|
{ RTEMS_OBJECT_TASK,
|
||||||
(void *) &_Thread_Information,
|
(void *) &_RTEMS_tasks_Information,
|
||||||
sizeof(rtems_monitor_task_t),
|
sizeof(rtems_monitor_task_t),
|
||||||
(rtems_monitor_object_next_fn) rtems_monitor_manager_next,
|
(rtems_monitor_object_next_fn) rtems_monitor_manager_next,
|
||||||
(rtems_monitor_object_canonical_fn) rtems_monitor_task_canonical,
|
(rtems_monitor_object_canonical_fn) rtems_monitor_task_canonical,
|
||||||
|
|||||||
@@ -416,8 +416,10 @@ void Stack_check_Fatal_extension( unsigned32 status )
|
|||||||
void Stack_check_Dump_usage( void )
|
void Stack_check_Dump_usage( void )
|
||||||
{
|
{
|
||||||
unsigned32 i;
|
unsigned32 i;
|
||||||
|
unsigned32 class_index;
|
||||||
Thread_Control *the_thread;
|
Thread_Control *the_thread;
|
||||||
unsigned32 hit_running = 0;
|
unsigned32 hit_running = 0;
|
||||||
|
Objects_Information *information;
|
||||||
|
|
||||||
if (stack_check_initialized == 0)
|
if (stack_check_initialized == 0)
|
||||||
return;
|
return;
|
||||||
@@ -425,12 +427,20 @@ void Stack_check_Dump_usage( void )
|
|||||||
printf(
|
printf(
|
||||||
" ID NAME LOW HIGH AVAILABLE USED\n"
|
" ID NAME LOW HIGH AVAILABLE USED\n"
|
||||||
);
|
);
|
||||||
for ( i=1 ; i<_Thread_Information.maximum ; i++ ) {
|
|
||||||
the_thread = (Thread_Control *)_Thread_Information.local_table[ i ];
|
for ( class_index = OBJECTS_CLASSES_FIRST ;
|
||||||
|
class_index <= OBJECTS_CLASSES_LAST ;
|
||||||
|
class_index++ ) {
|
||||||
|
information = _Objects_Information_table[ class_index ];
|
||||||
|
if ( information && information->is_thread ) {
|
||||||
|
for ( i=1 ; i < information->maximum ; i++ ) {
|
||||||
|
the_thread = (Thread_Control *)information->local_table[ i ];
|
||||||
Stack_check_Dump_threads_usage( the_thread );
|
Stack_check_Dump_threads_usage( the_thread );
|
||||||
if ( the_thread == _Thread_Executing )
|
if ( the_thread == _Thread_Executing )
|
||||||
hit_running = 1;
|
hit_running = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( !hit_running )
|
if ( !hit_running )
|
||||||
Stack_check_Dump_threads_usage( _Thread_Executing );
|
Stack_check_Dump_threads_usage( _Thread_Executing );
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ INIT - suspending TA2 while middle task on a ready chain
|
|||||||
TA1 - rtems_task_wake_after - sleep 1 second
|
TA1 - rtems_task_wake_after - sleep 1 second
|
||||||
TA2 - rtems_task_wake_after - sleep 1 minute
|
TA2 - rtems_task_wake_after - sleep 1 minute
|
||||||
TA3 - rtems_task_wake_after - sleep 5 seconds
|
TA3 - rtems_task_wake_after - sleep 5 seconds
|
||||||
TA1 - rtems_task_ident - tid of TA2 (0x04010007)
|
TA1 - rtems_task_ident - tid of TA2 (0x08010007)
|
||||||
TA1 - rtems_task_ident - tid of TA3 (0x04010008)
|
TA1 - rtems_task_ident - tid of TA3 (0x08010008)
|
||||||
TA1 - rtems_task_set_priority - set TA3's priority to 2
|
TA1 - rtems_task_set_priority - set TA3's priority to 2
|
||||||
TA1 - rtems_task_suspend - suspend TA2
|
TA1 - rtems_task_suspend - suspend TA2
|
||||||
TA1 - rtems_task_delete - delete TA2
|
TA1 - rtems_task_delete - delete TA2
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ PRI5 - rtems_semaphore_release - nested
|
|||||||
PRI5 - rtems_semaphore_release - restore priority
|
PRI5 - rtems_semaphore_release - restore priority
|
||||||
PRI5 - priority of PRI5 is 68
|
PRI5 - priority of PRI5 is 68
|
||||||
<pause>
|
<pause>
|
||||||
TA1 - rtems_semaphore_ident - smid => 0c010001
|
TA1 - rtems_semaphore_ident - smid => 10010001
|
||||||
TA1 - rtems_semaphore_obtain - wait forever on SM2
|
TA1 - rtems_semaphore_obtain - wait forever on SM2
|
||||||
TA1 - got SM2
|
TA1 - got SM2
|
||||||
TA1 - rtems_semaphore_obtain - wait forever on SM3
|
TA1 - rtems_semaphore_obtain - wait forever on SM3
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
*** TEST 13 ***
|
*** TEST 13 ***
|
||||||
TA1 - rtems_message_queue_ident - qid => 10010001
|
TA1 - rtems_message_queue_ident - qid => 14010001
|
||||||
TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1
|
TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1
|
||||||
TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1
|
TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1
|
||||||
TA1 - rtems_task_wake_after - sleep 5 seconds
|
TA1 - rtems_task_wake_after - sleep 5 seconds
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
*** TEST 15 ***
|
*** TEST 15 ***
|
||||||
INIT - rtems_partition_create - partition 1
|
INIT - rtems_partition_create - partition 1
|
||||||
INIT - rtems_partition_create - partition 2
|
INIT - rtems_partition_create - partition 2
|
||||||
TA1 - rtems_partition_ident - partition 1 id = 14010001
|
TA1 - rtems_partition_ident - partition 1 id = 18010001
|
||||||
TA1 - rtems_partition_ident - partition 2 id = 14010002
|
TA1 - rtems_partition_ident - partition 2 id = 18010002
|
||||||
TA1 - rtems_partition_get_buffer - buffer 1 from partition 1 - 0x00000000
|
TA1 - rtems_partition_get_buffer - buffer 1 from partition 1 - 0x00000000
|
||||||
TA1 - rtems_partition_get_buffer - buffer 2 from partition 1 - 0x00000200
|
TA1 - rtems_partition_get_buffer - buffer 2 from partition 1 - 0x00000200
|
||||||
TA1 - rtems_partition_get_buffer - buffer 1 from partition 2 - 0x00000000
|
TA1 - rtems_partition_get_buffer - buffer 1 from partition 2 - 0x00000000
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
*** TEST 16 ***
|
*** TEST 16 ***
|
||||||
TA1 - rtems_region_ident - rnid => 18010002
|
TA1 - rtems_region_ident - rnid => 1c010002
|
||||||
TA1 - rtems_region_get_segment - wait on 100 byte segment from region 2
|
TA1 - rtems_region_get_segment - wait on 100 byte segment from region 2
|
||||||
TA1 - got segment from region 2 - 0x00000f78
|
TA1 - got segment from region 2 - 0x00000f78
|
||||||
TA1 - rtems_region_get_segment - wait on 3K segment from region 3
|
TA1 - rtems_region_get_segment - wait on 3K segment from region 3
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
*** TEST 20 ***
|
*** TEST 20 ***
|
||||||
TA1 - rtems_rate_monotonic_create id = 0x20010001
|
TA1 - rtems_rate_monotonic_create id = 0x24010001
|
||||||
TA1 - rtems_rate_monotonic_ident id = 0x20010001
|
TA1 - rtems_rate_monotonic_ident id = 0x24010001
|
||||||
TA1 - (0x20010001) period 2
|
TA1 - (0x24010001) period 2
|
||||||
TA2 - rtems_rate_monotonic_create id = 0x20010002
|
TA2 - rtems_rate_monotonic_create id = 0x24010002
|
||||||
TA2 - rtems_rate_monotonic_ident id = 0x20010002
|
TA2 - rtems_rate_monotonic_ident id = 0x24010002
|
||||||
TA2 - (0x20010002) period 2
|
TA2 - (0x24010002) period 2
|
||||||
TA3 - rtems_rate_monotonic_create id = 0x20010003
|
TA3 - rtems_rate_monotonic_create id = 0x24010003
|
||||||
TA3 - rtems_rate_monotonic_ident id = 0x20010003
|
TA3 - rtems_rate_monotonic_ident id = 0x24010003
|
||||||
TA3 - (0x20010003) period 2
|
TA3 - (0x24010003) period 2
|
||||||
TA4 - rtems_rate_monotonic_create id = 0x20010004
|
TA4 - rtems_rate_monotonic_create id = 0x24010004
|
||||||
TA4 - rtems_rate_monotonic_ident id = 0x20010004
|
TA4 - rtems_rate_monotonic_ident id = 0x24010004
|
||||||
TA4 - (0x20010004) period 2
|
TA4 - (0x24010004) period 2
|
||||||
TA5 - rtems_rate_monotonic_create id = 0x20010005
|
TA5 - rtems_rate_monotonic_create id = 0x24010005
|
||||||
TA5 - rtems_rate_monotonic_ident id = 0x20010005
|
TA5 - rtems_rate_monotonic_ident id = 0x24010005
|
||||||
TA5 - (0x20010005) period 100
|
TA5 - (0x24010005) period 100
|
||||||
TA5 - PERIODS CHECK OK (1)
|
TA5 - PERIODS CHECK OK (1)
|
||||||
TA5 - PERIODS CHECK OK (2)
|
TA5 - PERIODS CHECK OK (2)
|
||||||
TA5 - PERIODS CHECK OK (3)
|
TA5 - PERIODS CHECK OK (3)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
*** TEST 22 ***
|
*** TEST 22 ***
|
||||||
INIT - rtems_timer_create - creating timer 1
|
INIT - rtems_timer_create - creating timer 1
|
||||||
INIT - timer 1 has id (0x8010001)
|
INIT - timer 1 has id (0xc010001)
|
||||||
TA1 - rtems_timer_ident - identing timer 1
|
TA1 - rtems_timer_ident - identing timer 1
|
||||||
TA1 - timer 1 has id (0x8010001)
|
TA1 - timer 1 has id (0xc010001)
|
||||||
TA1 - rtems_clock_get - 09:00:00 12/31/1988
|
TA1 - rtems_clock_get - 09:00:00 12/31/1988
|
||||||
TA1 - rtems_timer_fire_after - timer 1 in 3 seconds
|
TA1 - rtems_timer_fire_after - timer 1 in 3 seconds
|
||||||
TA1 - rtems_task_suspend( RTEMS_SELF )
|
TA1 - rtems_task_suspend( RTEMS_SELF )
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
*** TEST 23 ***
|
*** TEST 23 ***
|
||||||
INIT - rtems_port_create - DP1 - int = 0x00001000 ext = 0x00002000
|
INIT - rtems_port_create - DP1 - int = 0x00001000 ext = 0x00002000
|
||||||
TA1 - rtems_port_ident - 00010001
|
TA1 - rtems_port_ident - 0x20010001
|
||||||
TA1 - rtems_port_external_to_internal - 0x0000200e => 0x0000100e
|
TA1 - rtems_port_external_to_internal - 0x0000200e => 0x0000100e
|
||||||
TA1 - rtems_port_internal_to_external - 0x0000100e => 0x0000200e
|
TA1 - rtems_port_internal_to_external - 0x0000100e => 0x0000200e
|
||||||
TA1 - rtems_port_external_to_internal - 0x0000300e => 0x0000300e
|
TA1 - rtems_port_external_to_internal - 0x0000300e => 0x0000300e
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ rtems_task Task_1(
|
|||||||
|
|
||||||
status = rtems_port_ident( Port_name[ 1 ], &dpid );
|
status = rtems_port_ident( Port_name[ 1 ], &dpid );
|
||||||
directive_failed( status, "rtems_port_ident" );
|
directive_failed( status, "rtems_port_ident" );
|
||||||
printf( "TA1 - rtems_port_ident - %08x\n", dpid );
|
printf( "TA1 - rtems_port_ident - 0x%08x\n", dpid );
|
||||||
|
|
||||||
to_be_converted = &External_port_area[ 0xe ];
|
to_be_converted = &External_port_area[ 0xe ];
|
||||||
status = rtems_port_external_to_internal(
|
status = rtems_port_external_to_internal(
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
*** TEST 25 ***
|
*** TEST 25 ***
|
||||||
TA1 - rtems_region_ident - 0x18010002
|
TA1 - rtems_region_ident - 0x1c010002
|
||||||
TA1 - rtems_region_get_segment - wait on 64 byte segment from region 1
|
TA1 - rtems_region_get_segment - wait on 64 byte segment from region 1
|
||||||
TA1 - got segment from region 1 - 0x0000f9b8
|
TA1 - got segment from region 1 - 0x0000f9b8
|
||||||
TA1 - rtems_region_get_segment - wait on 128 byte segment from region 1
|
TA1 - rtems_region_get_segment - wait on 128 byte segment from region 1
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ uninitialized =
|
|||||||
|
|
||||||
/*taskmp.h*/ 0 +
|
/*taskmp.h*/ 0 +
|
||||||
|
|
||||||
/*tasks.h*/ 0 +
|
/*tasks.h*/ (sizeof _RTEMS_tasks_Information) +
|
||||||
|
|
||||||
/*thread.h*/ (sizeof _Thread_Dispatch_disable_level) +
|
/*thread.h*/ (sizeof _Thread_Dispatch_disable_level) +
|
||||||
(sizeof _Thread_Ticks_remaining_in_timeslice) +
|
(sizeof _Thread_Ticks_remaining_in_timeslice) +
|
||||||
@@ -304,7 +304,6 @@ uninitialized =
|
|||||||
(sizeof _Thread_Executing) +
|
(sizeof _Thread_Executing) +
|
||||||
(sizeof _Thread_Heir) +
|
(sizeof _Thread_Heir) +
|
||||||
(sizeof _Thread_Allocated_fp) +
|
(sizeof _Thread_Allocated_fp) +
|
||||||
(sizeof _Thread_Information) +
|
|
||||||
(sizeof _Thread_BSP_context) +
|
(sizeof _Thread_BSP_context) +
|
||||||
|
|
||||||
/*threadmp.h*/ (sizeof _Thread_MP_Receive) +
|
/*threadmp.h*/ (sizeof _Thread_MP_Receive) +
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ rtems_monitor_object_info_t rtems_monitor_object_info[] =
|
|||||||
(rtems_monitor_object_dump_fn) rtems_monitor_init_task_dump,
|
(rtems_monitor_object_dump_fn) rtems_monitor_init_task_dump,
|
||||||
},
|
},
|
||||||
{ RTEMS_OBJECT_TASK,
|
{ RTEMS_OBJECT_TASK,
|
||||||
(void *) &_Thread_Information,
|
(void *) &_RTEMS_tasks_Information,
|
||||||
sizeof(rtems_monitor_task_t),
|
sizeof(rtems_monitor_task_t),
|
||||||
(rtems_monitor_object_next_fn) rtems_monitor_manager_next,
|
(rtems_monitor_object_next_fn) rtems_monitor_manager_next,
|
||||||
(rtems_monitor_object_canonical_fn) rtems_monitor_task_canonical,
|
(rtems_monitor_object_canonical_fn) rtems_monitor_task_canonical,
|
||||||
|
|||||||
@@ -416,8 +416,10 @@ void Stack_check_Fatal_extension( unsigned32 status )
|
|||||||
void Stack_check_Dump_usage( void )
|
void Stack_check_Dump_usage( void )
|
||||||
{
|
{
|
||||||
unsigned32 i;
|
unsigned32 i;
|
||||||
|
unsigned32 class_index;
|
||||||
Thread_Control *the_thread;
|
Thread_Control *the_thread;
|
||||||
unsigned32 hit_running = 0;
|
unsigned32 hit_running = 0;
|
||||||
|
Objects_Information *information;
|
||||||
|
|
||||||
if (stack_check_initialized == 0)
|
if (stack_check_initialized == 0)
|
||||||
return;
|
return;
|
||||||
@@ -425,12 +427,20 @@ void Stack_check_Dump_usage( void )
|
|||||||
printf(
|
printf(
|
||||||
" ID NAME LOW HIGH AVAILABLE USED\n"
|
" ID NAME LOW HIGH AVAILABLE USED\n"
|
||||||
);
|
);
|
||||||
for ( i=1 ; i<_Thread_Information.maximum ; i++ ) {
|
|
||||||
the_thread = (Thread_Control *)_Thread_Information.local_table[ i ];
|
for ( class_index = OBJECTS_CLASSES_FIRST ;
|
||||||
|
class_index <= OBJECTS_CLASSES_LAST ;
|
||||||
|
class_index++ ) {
|
||||||
|
information = _Objects_Information_table[ class_index ];
|
||||||
|
if ( information && information->is_thread ) {
|
||||||
|
for ( i=1 ; i < information->maximum ; i++ ) {
|
||||||
|
the_thread = (Thread_Control *)information->local_table[ i ];
|
||||||
Stack_check_Dump_threads_usage( the_thread );
|
Stack_check_Dump_threads_usage( the_thread );
|
||||||
if ( the_thread == _Thread_Executing )
|
if ( the_thread == _Thread_Executing )
|
||||||
hit_running = 1;
|
hit_running = 1;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ( !hit_running )
|
if ( !hit_running )
|
||||||
Stack_check_Dump_threads_usage( _Thread_Executing );
|
Stack_check_Dump_threads_usage( _Thread_Executing );
|
||||||
|
|||||||
@@ -61,6 +61,25 @@ extern "C" {
|
|||||||
|
|
||||||
#define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
|
#define RTEMS_YIELD_PROCESSOR RTEMS_NO_TIMEOUT
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following defines the information control block used to
|
||||||
|
* manage this class of objects.
|
||||||
|
*/
|
||||||
|
|
||||||
|
EXTERN Objects_Information _RTEMS_tasks_Information;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* _RTEMS_tasks_Manager_initialization
|
||||||
|
*
|
||||||
|
* DESCRIPTION:
|
||||||
|
*
|
||||||
|
* This routine initializes all Task Manager related data structures.
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _RTEMS_tasks_Manager_initialization(
|
||||||
|
unsigned32 maximum_tasks
|
||||||
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* rtems_task_create
|
* rtems_task_create
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
|
STATIC INLINE Thread_Control *_RTEMS_tasks_Allocate( void )
|
||||||
{
|
{
|
||||||
return (Thread_Control *) _Objects_Allocate( &_Thread_Information );
|
return (Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
@@ -43,7 +43,7 @@ STATIC INLINE void _RTEMS_tasks_Free (
|
|||||||
Thread_Control *the_task
|
Thread_Control *the_task
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
_Objects_Free( &_Thread_Information, &the_task->Object );
|
_Objects_Free( &_RTEMS_tasks_Information, &the_task->Object );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define _RTEMS_tasks_Allocate() \
|
#define _RTEMS_tasks_Allocate() \
|
||||||
(Thread_Control *) _Objects_Allocate( &_Thread_Information )
|
(Thread_Control *) _Objects_Allocate( &_RTEMS_tasks_Information )
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define _RTEMS_tasks_Free( _the_task ) \
|
#define _RTEMS_tasks_Free( _the_task ) \
|
||||||
_Objects_Free( &_Thread_Information, &(_the_task)->Object )
|
_Objects_Free( &_RTEMS_tasks_Information, &(_the_task)->Object )
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -43,7 +43,8 @@ void _Dual_ported_memory_Manager_initialization(
|
|||||||
maximum_ports,
|
maximum_ports,
|
||||||
sizeof( Dual_ported_memory_Control ),
|
sizeof( Dual_ported_memory_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ void _Message_queue_Manager_initialization(
|
|||||||
maximum_message_queues,
|
maximum_message_queues,
|
||||||
sizeof( Message_queue_Control ),
|
sizeof( Message_queue_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ void _Partition_Manager_initialization(
|
|||||||
maximum_partitions,
|
maximum_partitions,
|
||||||
sizeof( Partition_Control ),
|
sizeof( Partition_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ void _Rate_monotonic_Manager_initialization(
|
|||||||
maximum_periods,
|
maximum_periods,
|
||||||
sizeof( Rate_monotonic_Control ),
|
sizeof( Rate_monotonic_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,8 @@ void _Region_Manager_initialization(
|
|||||||
maximum_regions,
|
maximum_regions,
|
||||||
sizeof( Region_Control ),
|
sizeof( Region_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ void _Timer_Manager_initialization(
|
|||||||
maximum_timers,
|
maximum_timers,
|
||||||
sizeof( Timer_Control ),
|
sizeof( Timer_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,8 @@ void _Semaphore_Manager_initialization(
|
|||||||
maximum_semaphores,
|
maximum_semaphores,
|
||||||
sizeof( Semaphore_Control ),
|
sizeof( Semaphore_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ void _RTEMS_tasks_MP_Process_packet (
|
|||||||
case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
|
case RTEMS_TASKS_MP_ANNOUNCE_CREATE:
|
||||||
|
|
||||||
ignored = _Objects_MP_Open(
|
ignored = _Objects_MP_Open(
|
||||||
&_Thread_Information,
|
&_RTEMS_tasks_Information,
|
||||||
the_packet->name,
|
the_packet->name,
|
||||||
the_packet->Prefix.id,
|
the_packet->Prefix.id,
|
||||||
TRUE
|
TRUE
|
||||||
@@ -205,7 +205,7 @@ void _RTEMS_tasks_MP_Process_packet (
|
|||||||
|
|
||||||
case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
|
case RTEMS_TASKS_MP_ANNOUNCE_DELETE:
|
||||||
|
|
||||||
_Objects_MP_Close( &_Thread_Information, the_packet->Prefix.id );
|
_Objects_MP_Close( &_RTEMS_tasks_Information, the_packet->Prefix.id );
|
||||||
|
|
||||||
_MPCI_Return_packet( the_packet_prefix );
|
_MPCI_Return_packet( the_packet_prefix );
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -26,6 +26,34 @@
|
|||||||
#include <rtems/userext.h>
|
#include <rtems/userext.h>
|
||||||
#include <rtems/wkspace.h>
|
#include <rtems/wkspace.h>
|
||||||
|
|
||||||
|
/*PAGE
|
||||||
|
*
|
||||||
|
* _RTEMS_tasks_Manager_initialization
|
||||||
|
*
|
||||||
|
* This routine initializes all Task Manager related data structures.
|
||||||
|
*
|
||||||
|
* Input parameters:
|
||||||
|
* maximum_tasks - number of tasks to initialize
|
||||||
|
*
|
||||||
|
* Output parameters: NONE
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _RTEMS_tasks_Manager_initialization(
|
||||||
|
unsigned32 maximum_tasks
|
||||||
|
)
|
||||||
|
{
|
||||||
|
_Objects_Initialize_information(
|
||||||
|
&_RTEMS_tasks_Information,
|
||||||
|
OBJECTS_RTEMS_TASKS,
|
||||||
|
TRUE,
|
||||||
|
maximum_tasks,
|
||||||
|
sizeof( Thread_Control ),
|
||||||
|
FALSE,
|
||||||
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
TRUE
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/*PAGE
|
/*PAGE
|
||||||
*
|
*
|
||||||
* rtems_task_create
|
* rtems_task_create
|
||||||
@@ -136,7 +164,7 @@ rtems_status_code rtems_task_create(
|
|||||||
the_thread->Start.fp_context = the_thread->fp_context;
|
the_thread->Start.fp_context = the_thread->fp_context;
|
||||||
|
|
||||||
if ( _Attributes_Is_global( the_attribute_set ) &&
|
if ( _Attributes_Is_global( the_attribute_set ) &&
|
||||||
!( _Objects_MP_Open( &_Thread_Information, name,
|
!( _Objects_MP_Open( &_RTEMS_tasks_Information, name,
|
||||||
the_thread->Object.id, FALSE ) ) ) {
|
the_thread->Object.id, FALSE ) ) ) {
|
||||||
_RTEMS_tasks_Free( the_thread );
|
_RTEMS_tasks_Free( the_thread );
|
||||||
(void) _Workspace_Free( memory );
|
(void) _Workspace_Free( memory );
|
||||||
@@ -157,7 +185,7 @@ rtems_status_code rtems_task_create(
|
|||||||
|
|
||||||
_ASR_Initialize( &the_thread->Signal );
|
_ASR_Initialize( &the_thread->Signal );
|
||||||
|
|
||||||
_Objects_Open( &_Thread_Information, &the_thread->Object, &name );
|
_Objects_Open( &_RTEMS_tasks_Information, &the_thread->Object, &name );
|
||||||
|
|
||||||
*id = the_thread->Object.id;
|
*id = the_thread->Object.id;
|
||||||
|
|
||||||
@@ -199,7 +227,7 @@ rtems_status_code rtems_task_ident(
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
if ( name != OBJECTS_ID_OF_SELF )
|
if ( name != OBJECTS_ID_OF_SELF )
|
||||||
return( _Objects_Name_to_id( &_Thread_Information, &name, node, id ) );
|
return( _Objects_Name_to_id( &_RTEMS_tasks_Information, &name, node, id ) );
|
||||||
|
|
||||||
*id = _Thread_Executing->Object.id;
|
*id = _Thread_Executing->Object.id;
|
||||||
return( RTEMS_SUCCESSFUL );
|
return( RTEMS_SUCCESSFUL );
|
||||||
@@ -368,7 +396,7 @@ rtems_status_code rtems_task_delete(
|
|||||||
_Thread_Dispatch();
|
_Thread_Dispatch();
|
||||||
return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
|
return( RTEMS_ILLEGAL_ON_REMOTE_OBJECT );
|
||||||
case OBJECTS_LOCAL:
|
case OBJECTS_LOCAL:
|
||||||
_Objects_Close( &_Thread_Information, &the_thread->Object );
|
_Objects_Close( &_RTEMS_tasks_Information, &the_thread->Object );
|
||||||
|
|
||||||
_Thread_Set_state( the_thread, STATES_TRANSIENT );
|
_Thread_Set_state( the_thread, STATES_TRANSIENT );
|
||||||
|
|
||||||
@@ -388,7 +416,7 @@ rtems_status_code rtems_task_delete(
|
|||||||
|
|
||||||
if ( _Attributes_Is_global( the_thread->attribute_set ) ) {
|
if ( _Attributes_Is_global( the_thread->attribute_set ) ) {
|
||||||
|
|
||||||
_Objects_MP_Close( &_Thread_Information, the_thread->Object.id );
|
_Objects_MP_Close( &_RTEMS_tasks_Information, the_thread->Object.id );
|
||||||
|
|
||||||
_RTEMS_tasks_MP_Send_process_packet(
|
_RTEMS_tasks_MP_Send_process_packet(
|
||||||
RTEMS_TASKS_MP_ANNOUNCE_DELETE,
|
RTEMS_TASKS_MP_ANNOUNCE_DELETE,
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
_TOD_Handler_initialization( configuration_table->microseconds_per_tick );
|
_TOD_Handler_initialization( configuration_table->microseconds_per_tick );
|
||||||
|
|
||||||
_Thread_Handler_initialization(
|
_Thread_Handler_initialization(
|
||||||
configuration_table->maximum_tasks,
|
|
||||||
configuration_table->ticks_per_timeslice,
|
configuration_table->ticks_per_timeslice,
|
||||||
multiprocessing_table->maximum_proxies
|
multiprocessing_table->maximum_proxies
|
||||||
);
|
);
|
||||||
@@ -165,6 +164,8 @@ rtems_interrupt_level rtems_initialize_executive_early(
|
|||||||
|
|
||||||
_Multiprocessing_Manager_initialization();
|
_Multiprocessing_Manager_initialization();
|
||||||
|
|
||||||
|
_RTEMS_tasks_Manager_initialization( configuration_table->maximum_tasks );
|
||||||
|
|
||||||
_Timer_Manager_initialization( configuration_table->maximum_timers );
|
_Timer_Manager_initialization( configuration_table->maximum_timers );
|
||||||
|
|
||||||
_Extension_Manager_initialization( configuration_table->maximum_extensions );
|
_Extension_Manager_initialization( configuration_table->maximum_extensions );
|
||||||
|
|||||||
@@ -42,7 +42,8 @@ void _Extension_Manager_initialization(
|
|||||||
maximum_extensions,
|
maximum_extensions,
|
||||||
sizeof( Extension_Control ),
|
sizeof( Extension_Control ),
|
||||||
FALSE,
|
FALSE,
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
RTEMS_MAXIMUM_NAME_LENGTH,
|
||||||
|
FALSE
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -78,17 +78,21 @@ typedef unsigned32 Objects_Id;
|
|||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
OBJECTS_NO_CLASS = 0,
|
OBJECTS_NO_CLASS = 0,
|
||||||
OBJECTS_RTEMS_TASKS = 1,
|
OBJECTS_INTERNAL_THREADS = 1,
|
||||||
OBJECTS_RTEMS_TIMERS = 2,
|
OBJECTS_RTEMS_TASKS = 2,
|
||||||
OBJECTS_RTEMS_SEMAPHORES = 3,
|
OBJECTS_RTEMS_TIMERS = 3,
|
||||||
OBJECTS_RTEMS_MESSAGE_QUEUES = 4,
|
OBJECTS_RTEMS_SEMAPHORES = 4,
|
||||||
OBJECTS_RTEMS_PARTITIONS = 5,
|
OBJECTS_RTEMS_MESSAGE_QUEUES = 5,
|
||||||
OBJECTS_RTEMS_REGIONS = 6,
|
OBJECTS_RTEMS_PARTITIONS = 6,
|
||||||
OBJECTS_RTEMS_PORTS = 7,
|
OBJECTS_RTEMS_REGIONS = 7,
|
||||||
OBJECTS_RTEMS_PERIODS = 8,
|
OBJECTS_RTEMS_PORTS = 8,
|
||||||
OBJECTS_RTEMS_EXTENSIONS = 9
|
OBJECTS_RTEMS_PERIODS = 9,
|
||||||
|
OBJECTS_RTEMS_EXTENSIONS = 10
|
||||||
} Objects_Classes;
|
} Objects_Classes;
|
||||||
|
|
||||||
|
#define OBJECTS_CLASSES_FIRST OBJECTS_NO_CLASS
|
||||||
|
#define OBJECTS_CLASSES_LAST OBJECTS_RTEMS_EXTENSIONS
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This enumerated type lists the locations which may be returned
|
* This enumerated type lists the locations which may be returned
|
||||||
* by _Objects_Get. These codes indicate the success of locating
|
* by _Objects_Get. These codes indicate the success of locating
|
||||||
@@ -128,6 +132,8 @@ typedef struct {
|
|||||||
Chain_Control Inactive; /* chain of inactive ctl blocks */
|
Chain_Control Inactive; /* chain of inactive ctl blocks */
|
||||||
boolean is_string; /* TRUE if names are strings */
|
boolean is_string; /* TRUE if names are strings */
|
||||||
unsigned32 name_length; /* maximum length of names */
|
unsigned32 name_length; /* maximum length of names */
|
||||||
|
boolean is_thread; /* TRUE if these are threads */
|
||||||
|
/* irregardless of API */
|
||||||
} Objects_Information;
|
} Objects_Information;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -137,6 +143,15 @@ typedef struct {
|
|||||||
|
|
||||||
EXTERN unsigned32 _Objects_Local_node;
|
EXTERN unsigned32 _Objects_Local_node;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The following is the list of information blocks for each object
|
||||||
|
* class. From the ID, we can go to one of these information blocks,
|
||||||
|
* and obtain a pointer to the appropriate object control block.
|
||||||
|
*/
|
||||||
|
|
||||||
|
EXTERN Objects_Information
|
||||||
|
*_Objects_Information_table[OBJECTS_CLASSES_LAST + 1];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following defines the constant which may be used
|
* The following defines the constant which may be used
|
||||||
* with _Objects_Get to manipulate the calling task.
|
* with _Objects_Get to manipulate the calling task.
|
||||||
@@ -201,7 +216,8 @@ void _Objects_Initialize_information (
|
|||||||
unsigned32 maximum,
|
unsigned32 maximum,
|
||||||
unsigned32 size,
|
unsigned32 size,
|
||||||
boolean is_string,
|
boolean is_string,
|
||||||
unsigned32 maximum_name_length
|
unsigned32 maximum_name_length,
|
||||||
|
boolean is_task
|
||||||
);
|
);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -228,13 +228,6 @@ EXTERN Thread_Control *_Thread_Heir;
|
|||||||
|
|
||||||
EXTERN Thread_Control *_Thread_Allocated_fp;
|
EXTERN Thread_Control *_Thread_Allocated_fp;
|
||||||
|
|
||||||
/*
|
|
||||||
* The following defines the information control block used to
|
|
||||||
* manage this class of objects.
|
|
||||||
*/
|
|
||||||
|
|
||||||
EXTERN Objects_Information _Thread_Information;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following context area contains the context of the "thread"
|
* The following context area contains the context of the "thread"
|
||||||
* which invoked rtems_initialize_executive. This context is restored
|
* which invoked rtems_initialize_executive. This context is restored
|
||||||
@@ -254,7 +247,6 @@ EXTERN Context_Control _Thread_BSP_context;
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
void _Thread_Handler_initialization (
|
void _Thread_Handler_initialization (
|
||||||
unsigned32 maximum_tasks,
|
|
||||||
unsigned32 ticks_per_timeslice,
|
unsigned32 ticks_per_timeslice,
|
||||||
unsigned32 maximum_proxies
|
unsigned32 maximum_proxies
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -231,6 +231,7 @@ STATIC INLINE boolean _Thread_Is_null (
|
|||||||
*
|
*
|
||||||
* _Thread_Get
|
* _Thread_Get
|
||||||
*
|
*
|
||||||
|
* NOTE: XXX... This routine may be able to be optimized.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
STATIC INLINE Thread_Control *_Thread_Get (
|
STATIC INLINE Thread_Control *_Thread_Get (
|
||||||
@@ -238,14 +239,30 @@ STATIC INLINE Thread_Control *_Thread_Get (
|
|||||||
Objects_Locations *location
|
Objects_Locations *location
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Objects_Classes the_class;
|
||||||
|
Objects_Information *information;
|
||||||
|
|
||||||
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
||||||
_Thread_Disable_dispatch();
|
_Thread_Disable_dispatch();
|
||||||
*location = OBJECTS_LOCAL;
|
*location = OBJECTS_LOCAL;
|
||||||
return( _Thread_Executing );
|
return( _Thread_Executing );
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Thread_Control *)
|
the_class = rtems_get_class( id );
|
||||||
_Objects_Get( &_Thread_Information, id, location );
|
|
||||||
|
if ( the_class > OBJECTS_CLASSES_LAST ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
information = _Objects_Information_table[ the_class ];
|
||||||
|
|
||||||
|
if ( !information || !information->is_thread ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (Thread_Control *) _Objects_Get( information, id, location );
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -68,7 +68,8 @@ void _Objects_Initialize_information(
|
|||||||
unsigned32 maximum,
|
unsigned32 maximum,
|
||||||
unsigned32 size,
|
unsigned32 size,
|
||||||
boolean is_string,
|
boolean is_string,
|
||||||
unsigned32 maximum_name_length
|
unsigned32 maximum_name_length,
|
||||||
|
boolean is_thread
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
unsigned32 minimum_index;
|
unsigned32 minimum_index;
|
||||||
@@ -80,6 +81,13 @@ void _Objects_Initialize_information(
|
|||||||
information->maximum = maximum;
|
information->maximum = maximum;
|
||||||
information->the_class = the_class;
|
information->the_class = the_class;
|
||||||
information->is_string = is_string;
|
information->is_string = is_string;
|
||||||
|
information->is_thread = is_thread;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Set the entry in the object information table.
|
||||||
|
*/
|
||||||
|
|
||||||
|
_Objects_Information_table[ the_class ] = information;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Calculate minimum and maximum Id's
|
* Calculate minimum and maximum Id's
|
||||||
|
|||||||
@@ -35,14 +35,13 @@
|
|||||||
* This routine initializes all thread manager related data structures.
|
* This routine initializes all thread manager related data structures.
|
||||||
*
|
*
|
||||||
* Input parameters:
|
* Input parameters:
|
||||||
* maximum_tasks - number of tasks to initialize
|
|
||||||
* ticks_per_timeslice - clock ticks per quantum
|
* ticks_per_timeslice - clock ticks per quantum
|
||||||
|
* maximum_proxies - number of proxies to initialize
|
||||||
*
|
*
|
||||||
* Output parameters: NONE
|
* Output parameters: NONE
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void _Thread_Handler_initialization(
|
void _Thread_Handler_initialization(
|
||||||
unsigned32 maximum_tasks,
|
|
||||||
unsigned32 ticks_per_timeslice,
|
unsigned32 ticks_per_timeslice,
|
||||||
unsigned32 maximum_proxies
|
unsigned32 maximum_proxies
|
||||||
)
|
)
|
||||||
@@ -57,16 +56,6 @@ void _Thread_Handler_initialization(
|
|||||||
_Thread_Ticks_remaining_in_timeslice = ticks_per_timeslice;
|
_Thread_Ticks_remaining_in_timeslice = ticks_per_timeslice;
|
||||||
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
_Thread_Ticks_per_timeslice = ticks_per_timeslice;
|
||||||
|
|
||||||
_Objects_Initialize_information(
|
|
||||||
&_Thread_Information,
|
|
||||||
OBJECTS_RTEMS_TASKS,
|
|
||||||
TRUE,
|
|
||||||
maximum_tasks,
|
|
||||||
sizeof( Thread_Control ),
|
|
||||||
FALSE,
|
|
||||||
RTEMS_MAXIMUM_NAME_LENGTH
|
|
||||||
);
|
|
||||||
|
|
||||||
_Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
|
_Thread_Ready_chain = _Workspace_Allocate_or_fatal_error(
|
||||||
(RTEMS_MAXIMUM_PRIORITY + 1) * sizeof(Chain_Control)
|
(RTEMS_MAXIMUM_PRIORITY + 1) * sizeof(Chain_Control)
|
||||||
);
|
);
|
||||||
@@ -789,6 +778,8 @@ boolean _Thread_Change_mode(
|
|||||||
*
|
*
|
||||||
* NOTE: If we are not using static inlines, this must be a real
|
* NOTE: If we are not using static inlines, this must be a real
|
||||||
* subroutine call.
|
* subroutine call.
|
||||||
|
*
|
||||||
|
* NOTE: XXX... This routine may be able to be optimized.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef USE_INLINES
|
#ifndef USE_INLINES
|
||||||
@@ -798,13 +789,29 @@ STATIC INLINE Thread_Control *_Thread_Get (
|
|||||||
Objects_Locations *location
|
Objects_Locations *location
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Objects_Classes the_class;
|
||||||
|
Objects_Information *information;
|
||||||
|
|
||||||
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
if ( _Objects_Are_ids_equal( id, OBJECTS_ID_OF_SELF ) ) {
|
||||||
_Thread_Disable_dispatch();
|
_Thread_Disable_dispatch();
|
||||||
*location = OBJECTS_LOCAL;
|
*location = OBJECTS_LOCAL;
|
||||||
return( _Thread_Executing );
|
return( _Thread_Executing );
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Thread_Control *) _Objects_Get( &_Thread_Information, id, location );
|
the_class = rtems_get_class( id );
|
||||||
|
|
||||||
|
if ( the_class > OBJECTS_CLASSES_LAST ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
information = _Objects_Information_table[ the_class ];
|
||||||
|
|
||||||
|
if ( !information || !information->is_thread ) {
|
||||||
|
*location = OBJECTS_ERROR;
|
||||||
|
return (Thread_Control *) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (Thread_Control *) _Objects_Get( information, id, location );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ INIT - suspending TA2 while middle task on a ready chain
|
|||||||
TA1 - rtems_task_wake_after - sleep 1 second
|
TA1 - rtems_task_wake_after - sleep 1 second
|
||||||
TA2 - rtems_task_wake_after - sleep 1 minute
|
TA2 - rtems_task_wake_after - sleep 1 minute
|
||||||
TA3 - rtems_task_wake_after - sleep 5 seconds
|
TA3 - rtems_task_wake_after - sleep 5 seconds
|
||||||
TA1 - rtems_task_ident - tid of TA2 (0x04010007)
|
TA1 - rtems_task_ident - tid of TA2 (0x08010007)
|
||||||
TA1 - rtems_task_ident - tid of TA3 (0x04010008)
|
TA1 - rtems_task_ident - tid of TA3 (0x08010008)
|
||||||
TA1 - rtems_task_set_priority - set TA3's priority to 2
|
TA1 - rtems_task_set_priority - set TA3's priority to 2
|
||||||
TA1 - rtems_task_suspend - suspend TA2
|
TA1 - rtems_task_suspend - suspend TA2
|
||||||
TA1 - rtems_task_delete - delete TA2
|
TA1 - rtems_task_delete - delete TA2
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ PRI5 - rtems_semaphore_release - nested
|
|||||||
PRI5 - rtems_semaphore_release - restore priority
|
PRI5 - rtems_semaphore_release - restore priority
|
||||||
PRI5 - priority of PRI5 is 68
|
PRI5 - priority of PRI5 is 68
|
||||||
<pause>
|
<pause>
|
||||||
TA1 - rtems_semaphore_ident - smid => 0c010001
|
TA1 - rtems_semaphore_ident - smid => 10010001
|
||||||
TA1 - rtems_semaphore_obtain - wait forever on SM2
|
TA1 - rtems_semaphore_obtain - wait forever on SM2
|
||||||
TA1 - got SM2
|
TA1 - got SM2
|
||||||
TA1 - rtems_semaphore_obtain - wait forever on SM3
|
TA1 - rtems_semaphore_obtain - wait forever on SM3
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
*** TEST 13 ***
|
*** TEST 13 ***
|
||||||
TA1 - rtems_message_queue_ident - qid => 10010001
|
TA1 - rtems_message_queue_ident - qid => 14010001
|
||||||
TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1
|
TA1 - rtems_message_queue_send - BUFFER 1 TO Q 1
|
||||||
TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1
|
TA1 - rtems_message_queue_send - BUFFER 2 TO Q 1
|
||||||
TA1 - rtems_task_wake_after - sleep 5 seconds
|
TA1 - rtems_task_wake_after - sleep 5 seconds
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
*** TEST 15 ***
|
*** TEST 15 ***
|
||||||
INIT - rtems_partition_create - partition 1
|
INIT - rtems_partition_create - partition 1
|
||||||
INIT - rtems_partition_create - partition 2
|
INIT - rtems_partition_create - partition 2
|
||||||
TA1 - rtems_partition_ident - partition 1 id = 14010001
|
TA1 - rtems_partition_ident - partition 1 id = 18010001
|
||||||
TA1 - rtems_partition_ident - partition 2 id = 14010002
|
TA1 - rtems_partition_ident - partition 2 id = 18010002
|
||||||
TA1 - rtems_partition_get_buffer - buffer 1 from partition 1 - 0x00000000
|
TA1 - rtems_partition_get_buffer - buffer 1 from partition 1 - 0x00000000
|
||||||
TA1 - rtems_partition_get_buffer - buffer 2 from partition 1 - 0x00000200
|
TA1 - rtems_partition_get_buffer - buffer 2 from partition 1 - 0x00000200
|
||||||
TA1 - rtems_partition_get_buffer - buffer 1 from partition 2 - 0x00000000
|
TA1 - rtems_partition_get_buffer - buffer 1 from partition 2 - 0x00000000
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
*** TEST 16 ***
|
*** TEST 16 ***
|
||||||
TA1 - rtems_region_ident - rnid => 18010002
|
TA1 - rtems_region_ident - rnid => 1c010002
|
||||||
TA1 - rtems_region_get_segment - wait on 100 byte segment from region 2
|
TA1 - rtems_region_get_segment - wait on 100 byte segment from region 2
|
||||||
TA1 - got segment from region 2 - 0x00000f78
|
TA1 - got segment from region 2 - 0x00000f78
|
||||||
TA1 - rtems_region_get_segment - wait on 3K segment from region 3
|
TA1 - rtems_region_get_segment - wait on 3K segment from region 3
|
||||||
|
|||||||
@@ -1,19 +1,19 @@
|
|||||||
*** TEST 20 ***
|
*** TEST 20 ***
|
||||||
TA1 - rtems_rate_monotonic_create id = 0x20010001
|
TA1 - rtems_rate_monotonic_create id = 0x24010001
|
||||||
TA1 - rtems_rate_monotonic_ident id = 0x20010001
|
TA1 - rtems_rate_monotonic_ident id = 0x24010001
|
||||||
TA1 - (0x20010001) period 2
|
TA1 - (0x24010001) period 2
|
||||||
TA2 - rtems_rate_monotonic_create id = 0x20010002
|
TA2 - rtems_rate_monotonic_create id = 0x24010002
|
||||||
TA2 - rtems_rate_monotonic_ident id = 0x20010002
|
TA2 - rtems_rate_monotonic_ident id = 0x24010002
|
||||||
TA2 - (0x20010002) period 2
|
TA2 - (0x24010002) period 2
|
||||||
TA3 - rtems_rate_monotonic_create id = 0x20010003
|
TA3 - rtems_rate_monotonic_create id = 0x24010003
|
||||||
TA3 - rtems_rate_monotonic_ident id = 0x20010003
|
TA3 - rtems_rate_monotonic_ident id = 0x24010003
|
||||||
TA3 - (0x20010003) period 2
|
TA3 - (0x24010003) period 2
|
||||||
TA4 - rtems_rate_monotonic_create id = 0x20010004
|
TA4 - rtems_rate_monotonic_create id = 0x24010004
|
||||||
TA4 - rtems_rate_monotonic_ident id = 0x20010004
|
TA4 - rtems_rate_monotonic_ident id = 0x24010004
|
||||||
TA4 - (0x20010004) period 2
|
TA4 - (0x24010004) period 2
|
||||||
TA5 - rtems_rate_monotonic_create id = 0x20010005
|
TA5 - rtems_rate_monotonic_create id = 0x24010005
|
||||||
TA5 - rtems_rate_monotonic_ident id = 0x20010005
|
TA5 - rtems_rate_monotonic_ident id = 0x24010005
|
||||||
TA5 - (0x20010005) period 100
|
TA5 - (0x24010005) period 100
|
||||||
TA5 - PERIODS CHECK OK (1)
|
TA5 - PERIODS CHECK OK (1)
|
||||||
TA5 - PERIODS CHECK OK (2)
|
TA5 - PERIODS CHECK OK (2)
|
||||||
TA5 - PERIODS CHECK OK (3)
|
TA5 - PERIODS CHECK OK (3)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
*** TEST 22 ***
|
*** TEST 22 ***
|
||||||
INIT - rtems_timer_create - creating timer 1
|
INIT - rtems_timer_create - creating timer 1
|
||||||
INIT - timer 1 has id (0x8010001)
|
INIT - timer 1 has id (0xc010001)
|
||||||
TA1 - rtems_timer_ident - identing timer 1
|
TA1 - rtems_timer_ident - identing timer 1
|
||||||
TA1 - timer 1 has id (0x8010001)
|
TA1 - timer 1 has id (0xc010001)
|
||||||
TA1 - rtems_clock_get - 09:00:00 12/31/1988
|
TA1 - rtems_clock_get - 09:00:00 12/31/1988
|
||||||
TA1 - rtems_timer_fire_after - timer 1 in 3 seconds
|
TA1 - rtems_timer_fire_after - timer 1 in 3 seconds
|
||||||
TA1 - rtems_task_suspend( RTEMS_SELF )
|
TA1 - rtems_task_suspend( RTEMS_SELF )
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
*** TEST 23 ***
|
*** TEST 23 ***
|
||||||
INIT - rtems_port_create - DP1 - int = 0x00001000 ext = 0x00002000
|
INIT - rtems_port_create - DP1 - int = 0x00001000 ext = 0x00002000
|
||||||
TA1 - rtems_port_ident - 00010001
|
TA1 - rtems_port_ident - 0x20010001
|
||||||
TA1 - rtems_port_external_to_internal - 0x0000200e => 0x0000100e
|
TA1 - rtems_port_external_to_internal - 0x0000200e => 0x0000100e
|
||||||
TA1 - rtems_port_internal_to_external - 0x0000100e => 0x0000200e
|
TA1 - rtems_port_internal_to_external - 0x0000100e => 0x0000200e
|
||||||
TA1 - rtems_port_external_to_internal - 0x0000300e => 0x0000300e
|
TA1 - rtems_port_external_to_internal - 0x0000300e => 0x0000300e
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ rtems_task Task_1(
|
|||||||
|
|
||||||
status = rtems_port_ident( Port_name[ 1 ], &dpid );
|
status = rtems_port_ident( Port_name[ 1 ], &dpid );
|
||||||
directive_failed( status, "rtems_port_ident" );
|
directive_failed( status, "rtems_port_ident" );
|
||||||
printf( "TA1 - rtems_port_ident - %08x\n", dpid );
|
printf( "TA1 - rtems_port_ident - 0x%08x\n", dpid );
|
||||||
|
|
||||||
to_be_converted = &External_port_area[ 0xe ];
|
to_be_converted = &External_port_area[ 0xe ];
|
||||||
status = rtems_port_external_to_internal(
|
status = rtems_port_external_to_internal(
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
*** TEST 25 ***
|
*** TEST 25 ***
|
||||||
TA1 - rtems_region_ident - 0x18010002
|
TA1 - rtems_region_ident - 0x1c010002
|
||||||
TA1 - rtems_region_get_segment - wait on 64 byte segment from region 1
|
TA1 - rtems_region_get_segment - wait on 64 byte segment from region 1
|
||||||
TA1 - got segment from region 1 - 0x0000f9b8
|
TA1 - got segment from region 1 - 0x0000f9b8
|
||||||
TA1 - rtems_region_get_segment - wait on 128 byte segment from region 1
|
TA1 - rtems_region_get_segment - wait on 128 byte segment from region 1
|
||||||
|
|||||||
@@ -295,7 +295,7 @@ uninitialized =
|
|||||||
|
|
||||||
/*taskmp.h*/ 0 +
|
/*taskmp.h*/ 0 +
|
||||||
|
|
||||||
/*tasks.h*/ 0 +
|
/*tasks.h*/ (sizeof _RTEMS_tasks_Information) +
|
||||||
|
|
||||||
/*thread.h*/ (sizeof _Thread_Dispatch_disable_level) +
|
/*thread.h*/ (sizeof _Thread_Dispatch_disable_level) +
|
||||||
(sizeof _Thread_Ticks_remaining_in_timeslice) +
|
(sizeof _Thread_Ticks_remaining_in_timeslice) +
|
||||||
@@ -304,7 +304,6 @@ uninitialized =
|
|||||||
(sizeof _Thread_Executing) +
|
(sizeof _Thread_Executing) +
|
||||||
(sizeof _Thread_Heir) +
|
(sizeof _Thread_Heir) +
|
||||||
(sizeof _Thread_Allocated_fp) +
|
(sizeof _Thread_Allocated_fp) +
|
||||||
(sizeof _Thread_Information) +
|
|
||||||
(sizeof _Thread_BSP_context) +
|
(sizeof _Thread_BSP_context) +
|
||||||
|
|
||||||
/*threadmp.h*/ (sizeof _Thread_MP_Receive) +
|
/*threadmp.h*/ (sizeof _Thread_MP_Receive) +
|
||||||
|
|||||||
Reference in New Issue
Block a user