Changeset b03ab630 in rtems


Ignore:
Timestamp:
08/15/96 18:57:07 (26 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
f3e19146
Parents:
57dae56
Message:

sched_rr_get_interval: converted assert condition into a standard error
code and added check for a NULL interval being passed in.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c/src/exec/posix/src/sched.c

    r57dae56 rb03ab630  
    130130   */
    131131
    132   assert( pid == getpid() );
     132  if ( pid == getpid() )
     133    set_errno_and_return_minus_one( ESRCH );
     134
     135  if ( !interval )
     136    set_errno_and_return_minus_one( EINVAL );
    133137
    134138  _POSIX_Interval_to_timespec( _Thread_Ticks_per_timeslice, interval );
  • cpukit/posix/src/sched.c

    r57dae56 rb03ab630  
    130130   */
    131131
    132   assert( pid == getpid() );
     132  if ( pid == getpid() )
     133    set_errno_and_return_minus_one( ESRCH );
     134
     135  if ( !interval )
     136    set_errno_and_return_minus_one( EINVAL );
    133137
    134138  _POSIX_Interval_to_timespec( _Thread_Ticks_per_timeslice, interval );
Note: See TracChangeset for help on using the changeset viewer.