summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2000-12-19 16:42:15 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2000-12-19 16:42:15 +0000
commit8f4bddd9c09e8ae3937d82a0133c30776b64c757 (patch)
treeac18dff0a0204072181ce7002a59ffd541660519 /c
parent2000-12-14 Joel Sherrill <joel@OARcorp.com> (diff)
downloadrtems-8f4bddd9c09e8ae3937d82a0133c30776b64c757.tar.bz2
2000-12-19 Joel Sherrill <joel@OARcorp.com>
* src/pthreadgetschedparam.c: Do not set output parameters if the pointers are NULL.
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/posix/ChangeLog5
-rw-r--r--c/src/exec/posix/src/pthreadgetschedparam.c11
2 files changed, 12 insertions, 4 deletions
diff --git a/c/src/exec/posix/ChangeLog b/c/src/exec/posix/ChangeLog
index 6ea0ce871d..1103b9b2a8 100644
--- a/c/src/exec/posix/ChangeLog
+++ b/c/src/exec/posix/ChangeLog
@@ -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
diff --git a/c/src/exec/posix/src/pthreadgetschedparam.c b/c/src/exec/posix/src/pthreadgetschedparam.c
index 258734bc5d..055fd45ac8 100644
--- a/c/src/exec/posix/src/pthreadgetschedparam.c
+++ b/c/src/exec/posix/src/pthreadgetschedparam.c
@@ -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;
}