forked from Imagelibrary/rtems
2000-08-30 Joel Sherrill <joel.sherrill@OARcorp.com>
* taskstart.c: Added 1st cut at rtems_task_start_main_style.
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
2000-08-30 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* taskstart.c: Added 1st cut at rtems_task_start_main_style.
|
||||
|
||||
2000-08-10 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* ChangeLog: New file.
|
||||
|
||||
@@ -46,10 +46,12 @@
|
||||
* error code - if unsuccessful
|
||||
*/
|
||||
|
||||
rtems_status_code rtems_task_start(
|
||||
rtems_id id,
|
||||
rtems_task_entry entry_point,
|
||||
unsigned32 argument
|
||||
rtems_status_code rtems_task_start_support(
|
||||
rtems_id id,
|
||||
rtems_task_entry entry_point,
|
||||
Thread_Start_types arg_style,
|
||||
unsigned32 u32_arg,
|
||||
void *void_arg
|
||||
)
|
||||
{
|
||||
register Thread_Control *the_thread;
|
||||
@@ -72,7 +74,7 @@ rtems_status_code rtems_task_start(
|
||||
|
||||
case OBJECTS_LOCAL:
|
||||
if ( _Thread_Start(
|
||||
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
|
||||
the_thread, arg_style, entry_point, void_arg, u32_arg ) ) {
|
||||
_Thread_Enable_dispatch();
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
@@ -82,3 +84,34 @@ rtems_status_code rtems_task_start(
|
||||
|
||||
return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
|
||||
}
|
||||
|
||||
rtems_status_code rtems_task_start(
|
||||
rtems_id id,
|
||||
rtems_task_entry entry_point,
|
||||
unsigned32 argument
|
||||
)
|
||||
{
|
||||
return rtems_task_start_support(
|
||||
id,
|
||||
entry_point,
|
||||
THREAD_START_NUMERIC,
|
||||
argument,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
rtems_status_code rtems_task_start_main_style(
|
||||
rtems_id id,
|
||||
rtems_task (*entry_point)(int, char **),
|
||||
int argc,
|
||||
char **argv
|
||||
)
|
||||
{
|
||||
return rtems_task_start_support(
|
||||
id,
|
||||
(rtems_task_entry) entry_point,
|
||||
THREAD_START_BOTH_NUMERIC_FIRST,
|
||||
argc,
|
||||
argv
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
2000-08-30 Joel Sherrill <joel.sherrill@OARcorp.com>
|
||||
|
||||
* taskstart.c: Added 1st cut at rtems_task_start_main_style.
|
||||
|
||||
2000-08-10 Joel Sherrill <joel@OARcorp.com>
|
||||
|
||||
* ChangeLog: New file.
|
||||
|
||||
@@ -46,10 +46,12 @@
|
||||
* error code - if unsuccessful
|
||||
*/
|
||||
|
||||
rtems_status_code rtems_task_start(
|
||||
rtems_id id,
|
||||
rtems_task_entry entry_point,
|
||||
unsigned32 argument
|
||||
rtems_status_code rtems_task_start_support(
|
||||
rtems_id id,
|
||||
rtems_task_entry entry_point,
|
||||
Thread_Start_types arg_style,
|
||||
unsigned32 u32_arg,
|
||||
void *void_arg
|
||||
)
|
||||
{
|
||||
register Thread_Control *the_thread;
|
||||
@@ -72,7 +74,7 @@ rtems_status_code rtems_task_start(
|
||||
|
||||
case OBJECTS_LOCAL:
|
||||
if ( _Thread_Start(
|
||||
the_thread, THREAD_START_NUMERIC, entry_point, NULL, argument ) ) {
|
||||
the_thread, arg_style, entry_point, void_arg, u32_arg ) ) {
|
||||
_Thread_Enable_dispatch();
|
||||
return RTEMS_SUCCESSFUL;
|
||||
}
|
||||
@@ -82,3 +84,34 @@ rtems_status_code rtems_task_start(
|
||||
|
||||
return RTEMS_INTERNAL_ERROR; /* unreached - only to remove warnings */
|
||||
}
|
||||
|
||||
rtems_status_code rtems_task_start(
|
||||
rtems_id id,
|
||||
rtems_task_entry entry_point,
|
||||
unsigned32 argument
|
||||
)
|
||||
{
|
||||
return rtems_task_start_support(
|
||||
id,
|
||||
entry_point,
|
||||
THREAD_START_NUMERIC,
|
||||
argument,
|
||||
NULL
|
||||
);
|
||||
}
|
||||
|
||||
rtems_status_code rtems_task_start_main_style(
|
||||
rtems_id id,
|
||||
rtems_task (*entry_point)(int, char **),
|
||||
int argc,
|
||||
char **argv
|
||||
)
|
||||
{
|
||||
return rtems_task_start_support(
|
||||
id,
|
||||
(rtems_task_entry) entry_point,
|
||||
THREAD_START_BOTH_NUMERIC_FIRST,
|
||||
argc,
|
||||
argv
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user