From 138aa38dead219cc0687187780040a9a20ba3dec Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Fri, 21 May 2004 20:19:33 +0000 Subject: 2004-05-21 Joel Sherrill PR 628/rtems * posix/src/killinfo.c, posix/src/pthreadkill.c, posix/src/ptimer1.c, posix/src/sigaction.c, posix/src/sigaddset.c, posix/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. --- cpukit/posix/src/ptimer1.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'cpukit/posix/src/ptimer1.c') diff --git a/cpukit/posix/src/ptimer1.c b/cpukit/posix/src/ptimer1.c index 6f7ec2466f..368dff43ff 100644 --- a/cpukit/posix/src/ptimer1.c +++ b/cpukit/posix/src/ptimer1.c @@ -271,6 +271,9 @@ int timer_create( rtems_id timer_id; /* created timer identifier */ int timer_pos; /* Position in the table of timers */ + if ( clock_id != CLOCK_REALTIME ) + rtems_set_errno_and_return_minus_one( EINVAL ); + /* * The data of the structure evp are checked in order to verify if they * are coherent. @@ -283,6 +286,12 @@ int timer_create( /* The value of the field sigev_notify is not valid */ rtems_set_errno_and_return_minus_one( EINVAL ); } + + if ( !evp->sigev_signo ) + rtems_set_errno_and_return_minus_one( EINVAL ); + + if ( !is_valid_signo(evp->sigev_signo) ) + rtems_set_errno_and_return_minus_one( EINVAL ); } /* -- cgit v1.2.3