diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-15 18:57:07 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1996-08-15 18:57:07 +0000 |
commit | b03ab63061284c13335c85bde581e89cbcc446c2 (patch) | |
tree | 38d4b91a5acfb3f167954378256d2eb828a9f20b /c | |
parent | added constant to indicate there is no mutex associated with this (diff) | |
download | rtems-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 'c')
-rw-r--r-- | c/src/exec/posix/src/sched.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/c/src/exec/posix/src/sched.c b/c/src/exec/posix/src/sched.c index cacb3400c4..b04ee5ec1a 100644 --- a/c/src/exec/posix/src/sched.c +++ b/c/src/exec/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; |