2000-12-19 Joel Sherrill <joel@OARcorp.com>

* src/pthreadgetschedparam.c: Do not set output parameters if
	the pointers are NULL.
This commit is contained in:
Joel Sherrill
2000-12-19 16:42:15 +00:00
parent da8d470c45
commit 8f4bddd9c0
4 changed files with 24 additions and 8 deletions

View File

@@ -1,3 +1,8 @@
2000-12-19 Joel Sherrill <joel@OARcorp.com>
* src/pthreadgetschedparam.c: Do not set output parameters if
the pointers are NULL.
2000-12-06 Joel Sherrill <joel@OARcorp.com>
* src/pthreadgetcpuclockid.c: Add include of <rtems/system.h> to

View File

@@ -40,10 +40,13 @@ int pthread_getschedparam(
return ESRCH;
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
*policy = api->schedpolicy;
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
if ( policy )
*policy = api->schedpolicy;
if ( param ) {
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
return 0;
}

View File

@@ -1,3 +1,8 @@
2000-12-19 Joel Sherrill <joel@OARcorp.com>
* src/pthreadgetschedparam.c: Do not set output parameters if
the pointers are NULL.
2000-12-06 Joel Sherrill <joel@OARcorp.com>
* src/pthreadgetcpuclockid.c: Add include of <rtems/system.h> to

View File

@@ -40,10 +40,13 @@ int pthread_getschedparam(
return ESRCH;
case OBJECTS_LOCAL:
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
*policy = api->schedpolicy;
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
if ( policy )
*policy = api->schedpolicy;
if ( param ) {
*param = api->schedparam;
param->sched_priority =
_POSIX_Priority_From_core( the_thread->current_priority );
}
_Thread_Enable_dispatch();
return 0;
}