Changeset ecdbb42 in rtems


Ignore:
Timestamp:
Jul 3, 2009, 6:40:31 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
78e28597
Parents:
2819bd1
Message:

2009-07-03 Joel Sherrill <joel.sherrill@…>

  • posix/src/sigtimedwait.c: Restructure to improve coverage. Improve comments.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r2819bd1 recdbb42  
     12009-07-03      Joel Sherrill <joel.sherrill@OARcorp.com>
     2
     3        * posix/src/sigtimedwait.c: Restructure to improve coverage. Improve
     4        comments.
     5
    162009-07-03      Daniel Hellstrom <daniel@gaisler.com>
    27
  • cpukit/posix/src/sigtimedwait.c

    r2819bd1 recdbb42  
    3434
    3535  for ( signo = SIGRTMIN ; signo <= SIGRTMAX ; signo++ ) {
    36     if ( set & signo_to_mask( signo ) )
    37       return signo;
     36    if ( set & signo_to_mask( signo ) ) {
     37      goto found_it;
     38    }
    3839  }
    3940
    40 /* XXX - add __SIGFIRSTNOTRT or something like that to newlib signal .h */
     41  /*
     42   *  We assume SIGHUP == 1 and is the first non-real-time signal.
     43   */
    4144
     45  #if (SIGHUP != 1)
     46    #error "Assumption that SIGHUP==1 violated!!"
     47  #endif
    4248  for ( signo = SIGHUP ; signo <= __SIGLASTNOTRT ; signo++ ) {
    43     if ( set & signo_to_mask( signo ) )
    44       return signo;
     49    if ( set & signo_to_mask( signo ) ) {
     50      goto found_it;
     51    }
    4552  }
    4653
    47   return 0;
     54  /*
     55   *  This is structured this way to eliminate the need to have
     56   *  a return 0.  This routine will NOT be called unless a signal
     57   *  is pending in the set passed in.
     58   */
     59found_it:
     60  return signo;
    4861}
    4962
     
    6477  /*
    6578   *  Error check parameters before disabling interrupts.
    66    *
    67    *  NOTE: This is very specifically a RELATIVE not ABSOLUTE time
     79   */
     80  if ( !set )
     81    rtems_set_errno_and_return_minus_one( EINVAL );
     82 
     83  /*  NOTE: This is very specifically a RELATIVE not ABSOLUTE time
    6884   *        in the Open Group specification.
    6985   */
Note: See TracChangeset for help on using the changeset viewer.