2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>

* posix/Makefile.am, posix/include/rtems/posix/psignal.h: Add stubs for
	gettimer() and setitimer().
	* posix/src/getitimer.c, posix/src/setitimer.c: New files.
This commit is contained in:
Joel Sherrill
2008-11-20 21:52:19 +00:00
parent ceadb90a71
commit d05ab3519a
5 changed files with 85 additions and 4 deletions

View File

@@ -1,3 +1,9 @@
2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* posix/Makefile.am, posix/include/rtems/posix/psignal.h: Add stubs for
gettimer() and setitimer().
* posix/src/getitimer.c, posix/src/setitimer.c: New files.
2008-11-20 Joel Sherrill <joel.sherrill@oarcorp.com>
* libcsupport/Makefile.am, posix/Makefile.am: Comment out including

View File

@@ -159,13 +159,14 @@ libposix_a_SOURCES += src/adjtime.c src/posixtimespecabsolutetimeout.c \
src/clockgetcpuclockid.c src/clockgetenableattr.c src/clockgetres.c \
src/clocksetenableattr.c
# the timer manager needs to be split further but only after its
# dependence on the Classic API Timer Manager is removed.
## TIMER_C_FILES
libposix_a_SOURCES += src/ptimer.c src/timercreate.c src/timerdelete.c \
src/timergetoverrun.c src/timergettime.c src/timersettime.c \
src/timertsr.c src/timerinserthelper.c
## ITIMER_C_FILES
libposix_a_SOURCES += src/getitimer.c src/setitimer.c
EXTRA_DIST += src/README.mqueue
libposix_a_SOURCES += src/sched_getparam.c src/sched_getprioritymax.c \

View File

@@ -23,9 +23,14 @@
*/
#define SIGNAL_EMPTY_MASK 0x00000000
#define SIGNAL_ALL_MASK 0xffffffff
#define SIGNAL_ALL_MASK 0xffffffffL
#define signo_to_mask( _sig ) (1 << ((_sig) - 1))
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return (1 << sig) - 1;
}
#define is_valid_signo( _sig ) \
((_sig) >= 1 && (_sig) <= 32 )

View File

@@ -0,0 +1,34 @@
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <time.h>
#include <sys/time.h>
#include <errno.h>
#include <rtems/seterr.h>
int getitimer(
int which,
struct itimerval *value
)
{
switch ( which ) {
case ITIMER_REAL: break;
case ITIMER_VIRTUAL: break;
case ITIMER_PROF: break;
}
rtems_set_errno_and_return_minus_one( ENOSYS );
/* return -1; */
}

View File

@@ -0,0 +1,35 @@
/*
* COPYRIGHT (c) 1989-2008.
* On-Line Applications Research Corporation (OAR).
*
* The license and distribution terms for this file may be
* found in the file LICENSE in this distribution or at
* http://www.rtems.com/license/LICENSE.
*
* $Id$
*/
#if HAVE_CONFIG_H
#include "config.h"
#endif
#include <time.h>
#include <sys/time.h>
#include <errno.h>
#include <rtems/seterr.h>
int setitimer(
int which,
const struct itimerval *value,
struct itimerval *ovalue
)
{
switch ( which ) {
case ITIMER_REAL: break;
case ITIMER_VIRTUAL: break;
case ITIMER_PROF: break;
}
rtems_set_errno_and_return_minus_one( ENOSYS );
/* return -1; */
}