renamed the local variable attrp to the_attr in pthread_create

This commit is contained in:
Joel Sherrill
1996-06-04 19:15:28 +00:00
parent 95645a45e2
commit 6b067c4eda
2 changed files with 22 additions and 22 deletions

View File

@@ -580,7 +580,7 @@ int pthread_create(
void *arg void *arg
) )
{ {
const pthread_attr_t *attrp; const pthread_attr_t *the_attr;
Priority_Control core_priority; Priority_Control core_priority;
boolean is_timesliced; boolean is_timesliced;
boolean is_fp; boolean is_fp;
@@ -591,9 +591,9 @@ int pthread_create(
int schedpolicy = SCHED_RR; int schedpolicy = SCHED_RR;
struct sched_param schedparams; struct sched_param schedparams;
attrp = (attr) ? attr : &_POSIX_Threads_Default_attributes; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
if ( !attrp->is_initialized ) if ( !the_attr->is_initialized )
return EINVAL; return EINVAL;
/* /*
@@ -620,15 +620,15 @@ int pthread_create(
* attributes structure. * attributes structure.
*/ */
switch ( attrp->inheritsched ) { switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED: case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy; schedpolicy = api->schedpolicy;
schedparams = api->Schedule; schedparams = api->Schedule;
break; break;
case PTHREAD_EXPLICIT_SCHED: case PTHREAD_EXPLICIT_SCHED:
schedpolicy = attrp->schedpolicy; schedpolicy = the_attr->schedpolicy;
schedparams = attrp->schedparam; schedparams = the_attr->schedparam;
break; break;
} }
@@ -638,10 +638,10 @@ int pthread_create(
is_timesliced = FALSE; is_timesliced = FALSE;
if ( !_POSIX_Priority_Is_valid( attrp->schedparam.sched_priority ) ) if ( !_POSIX_Priority_Is_valid( the_attr->schedparam.sched_priority ) )
return EINVAL; return EINVAL;
core_priority = _POSIX_Priority_To_core( attrp->schedparam.sched_priority ); core_priority = _POSIX_Priority_To_core(the_attr->schedparam.sched_priority);
switch ( schedpolicy ) { switch ( schedpolicy ) {
case SCHED_OTHER: case SCHED_OTHER:
@@ -693,8 +693,8 @@ int pthread_create(
status = _Thread_Initialize( status = _Thread_Initialize(
&_POSIX_Threads_Information, &_POSIX_Threads_Information,
the_thread, the_thread,
attrp->stackaddr, the_attr->stackaddr,
attrp->stacksize, the_attr->stacksize,
is_fp, is_fp,
core_priority, core_priority,
TRUE, /* preemptible */ TRUE, /* preemptible */
@@ -716,7 +716,7 @@ int pthread_create(
api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *attrp; api->Attributes = *the_attr;
api->detachstate = attr->detachstate; api->detachstate = attr->detachstate;
_Thread_queue_Initialize( _Thread_queue_Initialize(

View File

@@ -580,7 +580,7 @@ int pthread_create(
void *arg void *arg
) )
{ {
const pthread_attr_t *attrp; const pthread_attr_t *the_attr;
Priority_Control core_priority; Priority_Control core_priority;
boolean is_timesliced; boolean is_timesliced;
boolean is_fp; boolean is_fp;
@@ -591,9 +591,9 @@ int pthread_create(
int schedpolicy = SCHED_RR; int schedpolicy = SCHED_RR;
struct sched_param schedparams; struct sched_param schedparams;
attrp = (attr) ? attr : &_POSIX_Threads_Default_attributes; the_attr = (attr) ? attr : &_POSIX_Threads_Default_attributes;
if ( !attrp->is_initialized ) if ( !the_attr->is_initialized )
return EINVAL; return EINVAL;
/* /*
@@ -620,15 +620,15 @@ int pthread_create(
* attributes structure. * attributes structure.
*/ */
switch ( attrp->inheritsched ) { switch ( the_attr->inheritsched ) {
case PTHREAD_INHERIT_SCHED: case PTHREAD_INHERIT_SCHED:
api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ]; api = _Thread_Executing->API_Extensions[ THREAD_API_POSIX ];
schedpolicy = api->schedpolicy; schedpolicy = api->schedpolicy;
schedparams = api->Schedule; schedparams = api->Schedule;
break; break;
case PTHREAD_EXPLICIT_SCHED: case PTHREAD_EXPLICIT_SCHED:
schedpolicy = attrp->schedpolicy; schedpolicy = the_attr->schedpolicy;
schedparams = attrp->schedparam; schedparams = the_attr->schedparam;
break; break;
} }
@@ -638,10 +638,10 @@ int pthread_create(
is_timesliced = FALSE; is_timesliced = FALSE;
if ( !_POSIX_Priority_Is_valid( attrp->schedparam.sched_priority ) ) if ( !_POSIX_Priority_Is_valid( the_attr->schedparam.sched_priority ) )
return EINVAL; return EINVAL;
core_priority = _POSIX_Priority_To_core( attrp->schedparam.sched_priority ); core_priority = _POSIX_Priority_To_core(the_attr->schedparam.sched_priority);
switch ( schedpolicy ) { switch ( schedpolicy ) {
case SCHED_OTHER: case SCHED_OTHER:
@@ -693,8 +693,8 @@ int pthread_create(
status = _Thread_Initialize( status = _Thread_Initialize(
&_POSIX_Threads_Information, &_POSIX_Threads_Information,
the_thread, the_thread,
attrp->stackaddr, the_attr->stackaddr,
attrp->stacksize, the_attr->stacksize,
is_fp, is_fp,
core_priority, core_priority,
TRUE, /* preemptible */ TRUE, /* preemptible */
@@ -716,7 +716,7 @@ int pthread_create(
api = the_thread->API_Extensions[ THREAD_API_POSIX ]; api = the_thread->API_Extensions[ THREAD_API_POSIX ];
api->Attributes = *attrp; api->Attributes = *the_attr;
api->detachstate = attr->detachstate; api->detachstate = attr->detachstate;
_Thread_queue_Initialize( _Thread_queue_Initialize(