Fixed based on report from Peter Pointner <pr@schenk.isar.de> that

POSIX threads passed the incorrect pointer to a default name on
the stack.  POSIX threads did not need a name and neither did
ITRON tasks so this code was eliminated from both APIs.
This commit is contained in:
Joel Sherrill
2000-02-23 15:59:20 +00:00
parent 06383557e0
commit f362fa7698
3 changed files with 4 additions and 6 deletions

View File

@@ -30,7 +30,6 @@ ER cre_tsk(
) )
{ {
register Thread_Control *the_thread; register Thread_Control *the_thread;
char *name = "trn";
boolean status; boolean status;
Priority_Control core_priority; Priority_Control core_priority;
@@ -90,7 +89,7 @@ ER cre_tsk(
THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE, THREAD_CPU_BUDGET_ALGORITHM_EXHAUST_TIMESLICE,
NULL, /* no budget algorithm callout */ NULL, /* no budget algorithm callout */
0, 0,
&name NULL
); );
if ( !status ) { if ( !status ) {

View File

@@ -356,8 +356,8 @@ void _POSIX_Threads_Manager_initialization(
FALSE, /* does not support global */ FALSE, /* does not support global */
maximum_pthreads, maximum_pthreads,
sizeof( Thread_Control ), sizeof( Thread_Control ),
TRUE, FALSE,
5, /* length is arbitrary for now */ 0, /* length is arbitrary for now */
TRUE /* this class is threads */ TRUE /* this class is threads */
); );

View File

@@ -34,7 +34,6 @@ int pthread_create(
boolean is_fp; boolean is_fp;
boolean status; boolean status;
Thread_Control *the_thread; Thread_Control *the_thread;
char *default_name = "psx";
POSIX_API_Control *api; POSIX_API_Control *api;
int schedpolicy = SCHED_RR; int schedpolicy = SCHED_RR;
struct sched_param schedparam; struct sched_param schedparam;
@@ -177,7 +176,7 @@ int pthread_create(
budget_algorithm, budget_algorithm,
budget_callout, budget_callout,
0, /* isr level */ 0, /* isr level */
&default_name /* posix threads don't have a name */ NULL /* posix threads don't have a name */
); );
if ( !status ) { if ( !status ) {