Changeset cfc43898 in rtems


Ignore:
Timestamp:
05/21/04 20:16:39 (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Children:
01c96bfb
Parents:
0732eb4
Message:

2004-05-21 Joel Sherrill <joel@…>

PR 628/rtems

  • src/killinfo.c, src/pthreadkill.c, src/ptimer1.c, src/sigaction.c, src/sigaddset.c, src/sigsuspend.c: Signal set of 0 is supposed to return EINVAL. In addition timer_create needed to return an error if the clock was not CLOCK_REALTIME.
Location:
cpukit/posix
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • cpukit/posix/ChangeLog

    r0732eb4 rcfc43898  
     12004-05-21  Joel Sherrill <joel@OARcorp.com>
     2
     3        PR 628/rtems
     4        * src/killinfo.c, src/pthreadkill.c, src/ptimer1.c, src/sigaction.c,
     5        src/sigaddset.c, src/sigsuspend.c: Signal set of 0 is supposed to
     6        return EINVAL.  In addition timer_create needed to return an error
     7        if the clock was not CLOCK_REALTIME.
     8
    192004-05-21  Joel Sherrill <joel@OARcorp.com>
    210
  • cpukit/posix/src/killinfo.c

    r0732eb4 rcfc43898  
    6767
    6868  /*
    69    *  Validate the signal passed if not 0.
     69   *  Validate the signal passed.
    7070   */
    7171 
    72   if ( sig && !is_valid_signo(sig) ) {
     72  if ( !sig )
    7373    rtems_set_errno_and_return_minus_one( EINVAL );
     74
     75  if ( !is_valid_signo(sig) ) {
     76    rtems_set_errno_and_return_minus_one( EINVAL );
    7477  }
    7578
     
    7881   */
    7982
    80   if ( !sig || _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
     83  if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
    8184    return 0;
    8285  }
  • cpukit/posix/src/pthreadkill.c

    r0732eb4 rcfc43898  
    3535  Objects_Locations  location;
    3636
    37   if ( sig && !is_valid_signo(sig) )
     37  if ( !sig )
     38    rtems_set_errno_and_return_minus_one( EINVAL );
     39
     40  if ( !is_valid_signo(sig) )
    3841    rtems_set_errno_and_return_minus_one( EINVAL );
    3942
  • cpukit/posix/src/ptimer1.c

    r0732eb4 rcfc43898  
    272272  int               timer_pos; /* Position in the table of timers  */
    273273
     274  if ( clock_id != CLOCK_REALTIME )
     275    rtems_set_errno_and_return_minus_one( EINVAL );
     276
    274277 /*
    275278  *  The data of the structure evp are checked in order to verify if they
     
    284287       rtems_set_errno_and_return_minus_one( EINVAL );
    285288     }
    286   }
    287  
    288  /*
    289   *  A timer is created using the primitive rtems_timer_create
    290   */
     289
     290     if ( !evp->sigev_signo )
     291       rtems_set_errno_and_return_minus_one( EINVAL );
     292
     293     if ( !is_valid_signo(evp->sigev_signo) )
     294       rtems_set_errno_and_return_minus_one( EINVAL );
     295  }
     296 
     297  /*
     298   *  A timer is created using the primitive rtems_timer_create
     299   */
    291300
    292301  return_v = rtems_timer_create ( clock_id, &timer_id );
  • cpukit/posix/src/sigaction.c

    r0732eb4 rcfc43898  
    4444
    4545  if ( !sig )
    46     return 0;
     46    rtems_set_errno_and_return_minus_one( EINVAL );
    4747
    4848  if ( !is_valid_signo(sig) )
  • cpukit/posix/src/sigaddset.c

    r0732eb4 rcfc43898  
    3333
    3434  if ( !signo )
    35     return 0;
     35    rtems_set_errno_and_return_minus_one( EINVAL );
    3636
    3737  if ( !is_valid_signo(signo) )
  • cpukit/posix/src/sigsuspend.c

    r0732eb4 rcfc43898  
    22 *  3.3.7 Wait for a Signal, P1003.1b-1993, p. 75
    33 *
    4  *  COPYRIGHT (c) 1989-1999.
     4 *  COPYRIGHT (c) 1989-2004.
    55 *  On-Line Applications Research Corporation (OAR).
    66 *
     
    2222#include <rtems/posix/pthread.h>
    2323#include <rtems/posix/psignal.h>
     24#include <rtems/seterr.h>
    2425
    2526int sigsuspend(
     
    4243  (void) sigprocmask( SIG_SETMASK, &saved_signals_blocked, NULL );
    4344
     45  /*
     46   * sigtimedwait() returns the signal number while sigsuspend()
     47   * is supposed to return -1 and EINTR when a signal is caught.
     48   */
     49  if ( status != -1 )
     50    rtems_set_errno_and_return_minus_one( EINTR );
     51
    4452  return status;
    4553}
Note: See TracChangeset for help on using the changeset viewer.