summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/sched.c
diff options
context:
space:
mode:
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;