summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/sched.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-15 18:57:07 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-15 18:57:07 +0000
commitb03ab63061284c13335c85bde581e89cbcc446c2 (patch)
tree38d4b91a5acfb3f167954378256d2eb828a9f20b /cpukit/posix/src/sched.c
parentadded constant to indicate there is no mutex associated with this (diff)
downloadrtems-b03ab63061284c13335c85bde581e89cbcc446c2.tar.bz2
sched_rr_get_interval: converted assert condition into a standard error
code and added check for a NULL interval being passed in.
Diffstat (limited to 'cpukit/posix/src/sched.c')
-rw-r--r--cpukit/posix/src/sched.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/cpukit/posix/src/sched.c b/cpukit/posix/src/sched.c
index cacb3400c4..b04ee5ec1a 100644
--- a/cpukit/posix/src/sched.c
+++ b/cpukit/posix/src/sched.c
@@ -129,7 +129,11 @@ int sched_rr_get_interval(
* Only supported for the "calling process" (i.e. this node).
*/
- assert( pid == getpid() );
+ if ( pid == getpid() )
+ set_errno_and_return_minus_one( ESRCH );
+
+ if ( !interval )
+ set_errno_and_return_minus_one( EINVAL );
_POSIX_Interval_to_timespec( _Thread_Ticks_per_timeslice, interval );
return 0;