diff options
Diffstat (limited to 'newlib/libc/sys/rtems')
-rw-r--r-- | newlib/libc/sys/rtems/include/signal.h | 142 | ||||
-rw-r--r-- | newlib/libc/sys/rtems/include/time.h | 218 | ||||
-rw-r--r-- | newlib/libc/sys/rtems/sys/features.h | 111 | ||||
-rw-r--r-- | newlib/libc/sys/rtems/sys/sched.h | 56 | ||||
-rw-r--r-- | newlib/libc/sys/rtems/sys/siginfo.h | 176 | ||||
-rw-r--r-- | newlib/libc/sys/rtems/sys/signal.h | 6 | ||||
-rw-r--r-- | newlib/libc/sys/rtems/sys/time.h | 100 | ||||
-rw-r--r-- | newlib/libc/sys/rtems/sys/times.h | 31 |
8 files changed, 0 insertions, 840 deletions
diff --git a/newlib/libc/sys/rtems/include/signal.h b/newlib/libc/sys/rtems/include/signal.h deleted file mode 100644 index bb61b0c17..000000000 --- a/newlib/libc/sys/rtems/include/signal.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * $Id$ - */ - -#ifndef __POSIX_SIGNALS_h -#define __POSIX_SIGNALS_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/features.h> -#include "_ansi.h" - -#include <sys/time.h> -#include <sys/siginfo.h> -#include <reent.h> /* only for reentrant signal() and raise() */ - -/* - * 7.7 Signal handling <signal.h>, ANSI C Standard. - */ - -typedef int sig_atomic_t; - -/* - * ANSI C Signal Handling Functions - */ - -typedef void (*_sig_func_ptr) (); - -_sig_func_ptr _EXFUN(_signal_r, (struct _reent *, int, _sig_func_ptr)); -int _EXFUN(_raise_r, (struct _reent *, int)); - -#ifndef _REENT_ONLY -_sig_func_ptr _EXFUN(signal, (int, _sig_func_ptr)); -int _EXFUN(raise, (int)); -#endif - -/* - * 3.3.2 Send a Signal to a Process, P1003.1b-1993, p. 68 - * - * NOTE: Behavior of kill() depends on _POSIX_SAVED_IDS. - */ - -int _EXFUN(kill, (pid_t pid, int sig)); - -/* - * 3.3.3 Manipulate Signal Sets, P1003.1b-1993, p. 69 - */ - -int _EXFUN(sigemptyset, (sigset_t *set)); -int _EXFUN(sigfillset, (sigset_t *set)); -int _EXFUN(sigaddset, (sigset_t *set, int signo)); -int _EXFUN(sigdelset, (sigset_t *set, int signo)); -int _EXFUN(sigismember, (const sigset_t *set, int signo)); - -/* - * 3.3.4 Examine and Change Signal Action, P1003.1b-1993, p. 70 - */ - -int _EXFUN(sigaction, - (int sig, const struct sigaction *act, struct sigaction *oact) -); - -/* - * 3.3.5 Examine and Change Blocked Signals, P1003.1b-1993, p. 73 - * - * NOTE: P1003.1c/D10, p. 37 adds pthread_sigmask(). - */ - -/* values for how */ - -#define SIG_BLOCK 1 /* resulting_set = (current_set | set) */ -#define SIG_UNBLOCK 2 /* resulting_set = (current_set & ~set) */ -#define SIG_SETMASK 3 /* resulting_set = set */ - -int _EXFUN(sigprocmask, (int how, const sigset_t *set, sigset_t *oset)); - -#if defined(_POSIX_THREADS) -int _EXFUN(pthread_sigmask, (int how, const sigset_t *set, sigset_t *oset)); -#endif - -/* - * 3.3.6 Examine Pending Signals, P1003.1b-1993, p. 75 - */ - -int _EXFUN(sigpending, (sigset_t *set)); - -/* - * 3.3.7 Wait for a Signal, P1003.1b-1993, p. 75 - */ - -int _EXFUN(sigsuspend, (const sigset_t *sigmask)); - -#if defined(_POSIX_REALTIME_SIGNALS) - -/* - * 3.3.8 Synchronously Accept a Signal, P1003.1b-1993, p. 76 - * - * NOTE: P1003.1c/D10, p. 39 adds sigwait(). - */ - -int _EXFUN(sigwaitinfo, (const sigset_t *set, siginfo_t *info)); -int _EXFUN(sigtimedwait, - (const sigset_t *set, siginfo_t *info, const struct timespec *timeout) -); -int _EXFUN(sigwait, (const sigset_t *set, int *sig)); - -/* - * 3.3.9 Queue a Signal to a Process, P1003.1b-1993, p. 78 - */ - -int _EXFUN(sigqueue, (pid_t pid, int signo, const union sigval value)); - -#endif - -/* - * 3.3.10 Send a Signal to a Thread, P1003.1c/D10, p. 43 - */ - -#if defined(_POSIX_THREADS) -int _EXFUN(pthread_kill, (pthread_t thread, int sig)); -#endif - -/* - * 3.4.1 Schedule Alarm, P1003.1b-1993, p. 79 - */ - -unsigned int _EXFUN(alarm, (unsigned int seconds)); - -/* - * 3.4.2 Suspend Process Execution, P1003.1b-1993, p. 80 - */ - -int _EXFUN(pause, (void)); - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/newlib/libc/sys/rtems/include/time.h b/newlib/libc/sys/rtems/include/time.h deleted file mode 100644 index 647adc6d5..000000000 --- a/newlib/libc/sys/rtems/include/time.h +++ /dev/null @@ -1,218 +0,0 @@ -/* - * $Id$ - */ - - -#ifndef __POSIX_TIME_h -#define __POSIX_TIME_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/features.h> -#include "_ansi.h" -#include <sys/types.h> -#include <sys/time.h> -#include <sys/siginfo.h> - -/* - * 4.8.1.5 Special Symbol {CLK_TCK}, P1003.1b-1993, p. 97 - */ - -#define CLK_TCK sysconf(_SC_CLK_TCK) - -/* - * Get size_t from the GNU C version of stddef.h - */ - -#define __need_size_t -#include <stddef.h> - -/* - * ANSI C Time Conversion Structure - * - * XXX reference - */ - -struct tm -{ - int tm_sec; - int tm_min; - int tm_hour; - int tm_mday; - int tm_mon; - int tm_year; - int tm_wday; - int tm_yday; - int tm_isdst; -}; - -/* - * ANSI C Time Conversion Routines - * - * XXX reference - */ - -clock_t _EXFUN(clock, (void)); -double _EXFUN(difftime, (time_t _time2, time_t _time1)); -time_t _EXFUN(mktime, (struct tm *_timeptr)); -time_t _EXFUN(time, (time_t *_timer)); -size_t _EXFUN(strftime, - (char *_s, size_t _maxsize, const char *_fmt, const struct tm *_t)); - -#ifndef _REENT_ONLY -char *_EXFUN(asctime, (const struct tm *_tblock)); -char *_EXFUN(ctime, (const time_t *_time)); -struct tm *_EXFUN(gmtime, (const time_t *_timer)); -struct tm *_EXFUN(localtime,(const time_t *_timer)); -#endif - -/* - * Added by 8.3.5 - 8.3.8, P1002.1c/D10, p. 66-69. - */ - -char *_EXFUN(asctime_r, (const struct tm *, char *)); -char *_EXFUN(ctime_r, (const time_t *, char *)); -struct tm *_EXFUN(gmtime_r, (const time_t *, struct tm *)); -struct tm *_EXFUN(localtime_r, (const time_t *, struct tm *)); - -/* - * 4.5.1 Get System Time, P1003.1b-1993, p. 91 - */ - -time_t _EXFUN(time, (time_t *tloc)); - -#if defined(_POSIX_TIMERS) - -/* - * 14.2.1 Clocks, P1003.1b-1993, p. 263 - */ - -int _EXFUN(clock_settime, (clockid_t clock_id, const struct timespec *tp)); -int _EXFUN(clock_gettime, (clockid_t clock_id, struct timespec *tp)); -int _EXFUN(clock_getres, (clockid_t clock_id, struct timespec *res)); - -/* - * 14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264 - */ - -int _EXFUN(timer_create, - (clockid_t clock_id, struct sigevent *evp, timer_t *timerid) -); - -/* - * 14.2.3 Delete a Per_process Timer, P1003.1b-1993, p. 266 - */ - -int _EXFUN(timer_delete, (timer_t timerid)); - -/* - * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267 - */ - -int _EXFUN(timer_settime, - (timer_t timerid, - int flags, - const struct itimerspec *value, - struct itimerspec *ovalue) -); - -int _EXFUN(timer_gettime, (timer_t timerid, struct itimerspec *value)); -int _EXFUN(timer_getoverrun, (timer_t timerid)); - -/* - * 14.2.5 High Resolution Sleep, P1003.1b-1993, p. 269 - */ - -int _EXFUN(nanosleep, (const struct timespec *rqtp, struct timespec *rmtp)); - -#endif /* _POSIX_TIMERS */ - -/* - * 20.1.1 CPU-time Clock Attributes, P1003.4b/D8, p. 54 - */ - -/* values for the clock enable attribute */ - -#define CLOCK_ENABLED 1 /* clock is enabled, i.e. counting execution time */ -#define CLOCK_DISABLED 0 /* clock is disabled */ - -/* values for the pthread cputime_clock_allowed attribute */ - -#define CLOCK_ALLOWED 1 /* If a thread is created with this value a */ - /* CPU-time clock attached to that thread */ - /* shall be accessible. */ -#define CLOCK_DISALLOWED 0 /* If a thread is created with this value, the */ - /* thread shall not have a CPU-time clock */ - /* accessible. */ - -/* - * 14.1.3 Manifest Constants, P1003.1b-1993, p. 262 - */ - -#define CLOCK_REALTIME (clockid_t)1 - -/* - * Flag indicating time is "absolute" with respect to the clock - * associated with a time - */ - -#define TIMER_ABSTIME 4 - -/* - * 20.1.2 Manifest Constants, P1003.4b/D8, p. 55 - */ - -#if defined(_POSIX_CPUTIME) - -/* - * When used in a clock or timer function call, this is interpreted as - * the identifier of the CPU_time clock associated with the PROCESS - * making the function call. - */ - -#define CLOCK_PROCESS_CPUTIME (clockid_t)2 - -#endif - -#if defined(_POSIX_THREAD_CPUTIME) - -/* - * When used in a clock or timer function call, this is interpreted as - * the identifier of the CPU_time clock associated with the THREAD - * making the function call. - */ - -#define CLOCK_THREAD_CPUTIME (clockid_t)3 - -#endif - -#if defined(_POSIX_CPUTIME) - -/* - * 20.1.3 Accessing a Process CPU-time CLock, P1003.4b/D8, p. 55 - */ - -int _EXFUN(clock_getcpuclockid, (pid_t pid, clockid_t *clock_id)); - -#endif /* _POSIX_CPUTIME */ - -#if defined(_POSIX_CPUTIME) || defined(_POSIX_THREAD_CPUTIME) - -/* - * 20.1.5 CPU-time Clock Attribute Access, P1003.4b/D8, p. 56 - */ - -int _EXFUN(clock_setenable_attr, (clockid_t clock_id, int attr)); - -int _EXFUN(clock_getenable_attr, (clockid_t clock_id, int *attr)); - -#endif /* _POSIX_CPUTIME or _POSIX_THREAD_CPUTIME */ - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/newlib/libc/sys/rtems/sys/features.h b/newlib/libc/sys/rtems/sys/features.h deleted file mode 100644 index 8a6b8cb5a..000000000 --- a/newlib/libc/sys/rtems/sys/features.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * This file lists the symbols which may be defined to indicate - * the presence of POSIX features subsets. If defined, the - * feature must be supported. - * - * NOTE: This file lists all feature constants. The ones not supported - * should be commented out. - * - * XXX: These are all "Compile-Time Symbolic Constants". Need to - * address "Execution-Time" ones. - * - * $Id$ - */ - -#ifndef __RTEMS_POSIX_FEATURES_h -#define __RTEMS_POSIX_FEATURES_h - -/* - * XXX: Temporary function so we can break when something that is - * not implemented is invoked. - */ - -int POSIX_MP_NOT_IMPLEMENTED( void ); -int POSIX_NOT_IMPLEMENTED( void ); -int POSIX_BOTTOM_REACHED( void ); - -/**************************************************************************** - **************************************************************************** - * * - * P1003.1b-1993 defines the constants below this comment. * - * * - **************************************************************************** - ****************************************************************************/ - -/* - * Newlib may already have this set defined. - */ - -#ifndef _POSIX_JOB_CONTROL -#define _POSIX_JOB_CONTROL -#endif - -#ifndef _POSIX_SAVED_IDS -#define _POSIX_SAVED_IDS -#endif - -#define _POSIX_ASYNCHRONOUS_IO -#define _POSIX_FSYNC -#define _POSIX_MAPPED_FILES -#define _POSIX_MEMLOCK -#define _POSIX_MEMLOCK_RANGE -#define _POSIX_MEMORY_PROTECTION -#define _POSIX_MESSAGE_PASSING -#define _POSIX_PRIORITIZED_IO -#define _POSIX_PRIORITY_SCHEDULING -#define _POSIX_REALTIME_SIGNALS -#define _POSIX_SEMAPHORES -#define _POSIX_SHARED_MEMORY_OBJECTS -#define _POSIX_SYNCHRONIZED_IO -#define _POSIX_TIMERS - -/* - * This indicates the version number of the POSIX standard we are - * trying to be compliant with. - * - * NOTE: Newlib may already have this set defined. - */ - -#ifdef _POSIX_VERSION -#undef _POSIX_VERSION -#define _POSIX_VERSION 199309L -#endif - -/**************************************************************************** - **************************************************************************** - * * - * P1003.1c/D10 defines the constants below this comment. * - * * - **************************************************************************** - ****************************************************************************/ - -#define _POSIX_THREADS -#define _POSIX_THREAD_ATTR_STACKADDR -#define _POSIX_THREAD_ATTR_STACKSIZE -#define _POSIX_THREAD_PRIORITY_SCHEDULING -#define _POSIX_THREAD_PRIO_INHERIT -#define _POSIX_THREAD_PRIO_PROTECT -#define _POSIX_THREAD_PROCESS_SHARED -#define _POSIX_THREAD_SAFE_FUNCTIONS - -/**************************************************************************** - **************************************************************************** - * * - * P1003.4b/D8 defines the constants below this comment. * - * * - **************************************************************************** - ****************************************************************************/ - -#define _POSIX_SPAWN -#define _POSIX_TIMEOUTS -#define _POSIX_CPUTIME -#define _POSIX_THREAD_CPUTIME -#define _POSIX_SPORADIC_SERVER -#define _POSIX_THREAD_SPORADIC_SERVER -#define _POSIX_DEVICE_CONTROL -#define _POSIX_DEVCTL_DIRECTION -#define _POSIX_INTERRUPT_CONTROL -#define _POSIX_ADVISORY_INFO - -#endif -/* end of include file */ diff --git a/newlib/libc/sys/rtems/sys/sched.h b/newlib/libc/sys/rtems/sys/sched.h deleted file mode 100644 index 16cee13c7..000000000 --- a/newlib/libc/sys/rtems/sys/sched.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - * $Id$ - */ - - -#ifndef __POSIX_SYS_SCHEDULING_h -#define __POSIX_SYS_SCHEDULING_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/features.h> - -#include <sys/types.h> -#include <sys/time.h> - -/* - * 13.2 Scheduling Policies, P1003.1b-1993, p. 250 - * - * NOTE: SCHED_SPORADIC added by P1003.4b/D8, p. 34. - */ - -#define SCHED_OTHER 0 -#define SCHED_FIFO 1 -#define SCHED_RR 2 - -#if defined(_POSIX_SPORADIC_SERVER) -#define SCHED_SPORADIC 3 -#endif - -/* - * 13.1 Scheduling Parameters, P1003.1b-1993, p. 249 - * - * NOTE: Fields whose name begins with "ss_" added by P1003.4b/D8, p. 33. - */ - -struct sched_param { - int sched_priority; /* Process execution scheduling priority */ - -#if defined(_POSIX_SPORADIC_SERVER) - int ss_low_priority; /* Low scheduling priority for sporadic */ - /* server */ - struct timespec ss_replenish_period; - /* Replenishment period for sporadic server */ - struct timespec ss_initial_budget; /* Initial budget for sporadic server */ -#endif -}; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - diff --git a/newlib/libc/sys/rtems/sys/siginfo.h b/newlib/libc/sys/rtems/sys/siginfo.h deleted file mode 100644 index c1bcf61ae..000000000 --- a/newlib/libc/sys/rtems/sys/siginfo.h +++ /dev/null @@ -1,176 +0,0 @@ -/* - * $Id$ - */ - -#ifndef __POSIX_SYS_SIGNAL_INFORMATION_h -#define __POSIX_SYS_SIGNAL_INFORMATION_h - -#ifdef __cplusplus -extern "C" { -#endif - -#if defined(_POSIX_THREADS) -#include <sys/types.h> -#endif - -/* - * 3.3 Signal Concepts, P1003.1b-1993, p. 60 - */ - -typedef __uint32_t sigset_t; - -#define SIG_DFL ((void (*)())0) /* Request for default signal handling */ -#define SIG_IGN ((void (*)())1) /* Request that signal be ignored */ - -#define SIG_ERR ((void (*)())-1) /* Returned by signal() on error */ - -/* - * Required Signals. - * - * The default action is in parentheses and is one of the - * following actions: - * - * (1) abnormal termination of process - * (2) ignore the signal - * (3) stop the process - * (4) continue the process if it is currently stopped, otherwise - * ignore the signal - */ - -#define SIGHUP 1 /* (1) hangup detected on controlling terminal */ -#define SIGINT 2 /* (1) interactive attention signal */ -#define SIGQUIT 3 /* (1) interactive termination signal */ -#define SIGILL 4 /* (1) illegal instruction */ -#define SIGTRAP 5 /* (1) trace trap (not reset) */ -#define SIGIOT 6 /* (1) IOT instruction */ -#define SIGABRT 6 /* (1) abnormal terminal signal */ -#define SIGEMT 7 /* (1) EMT instruction */ -#define SIGFPE 8 /* (1) erroneous arithmetic operation */ -#define SIGKILL 9 /* (1) termination signal */ -#define SIGBUS 10 /* (1) bus error */ -#define SIGSEGV 11 /* (1) invalid memory reference */ -#define SIGSYS 12 /* (1) bad argument to system call */ -#define SIGPIPE 13 /* (1) write on pipe with no readers */ -#define SIGALRM 14 /* (1) timeout signal, such as initiated by alarm() */ -#define SIGTERM 15 /* (1) termination signal */ -#define SIGUSR1 16 /* (1) reserved as application defined signal 1 */ -#define SIGUSR2 17 /* (1) reserved as application defined signal 2 */ - -#define __SIGFIRSTNOTRT SIGHUP -#define __SIGLASTNOTRT SIGUSR2 - -/* - * RTEMS does not support job control, hence no Job Control Signals are - * defined per P1003.1b-1993, p. 60-61. - */ - -/* - * RTEMS does not support memory protection, hence no Memory Protection - * Signals are defined per P1003.1b-1993, p. 60-61. - */ - -/* - * Real-Time Signals Range, P1003.1b-1993, p. 61 - * - * NOTE: This should be at least RTSIG_MAX (which is a minimum of 8) signals. - */ - -#define SIGRTMIN 18 -#define SIGRTMAX 32 - -/* sigev_notify values - * - * NOTE: P1003.1c/D10, p. 34 adds SIGEV_THREAD. - */ - -#define SIGEV_NONE 1 /* No asynchronous notification shall be delivered */ - /* when the event of interest occurs. */ -#define SIGEV_SIGNAL 2 /* A queued signal, with an application defined */ - /* value, shall be delivered when the event of */ - /* interest occurs. */ -#define SIGEV_THREAD 3 /* A notification function shall be called to */ - /* perform notification. */ -/* - * 3.3.1.2 Signal Generation and Delivery, P1003.1b-1993, p. 63 - * - * NOTE: P1003.1c/D10, p. 34 adds sigev_notify_function and - * sigev_notify_attributes to the sigevent structure. - */ - -union sigval { - int sival_int; /* Integer signal value */ - void *sival_ptr; /* Pointer signal value */ -}; - -struct sigevent { - int sigev_notify; /* Notification type */ - int sigev_signo; /* Signal number */ - union sigval sigev_value; /* Signal value */ - -#if defined(_POSIX_THREADS) - void (*sigev_notify_function)( union sigval ); - /* Notification function */ - pthread_attr_t *sigev_notify_attributes; /* Notification Attributes */ -#endif -}; - -/* - * 3.3.1.3 Signal Actions, P1003.1b-1993, p. 64 - */ - -/* si_code values, p. 66 */ - -#define SI_USER 1 /* Sent by a user. kill(), abort(), etc */ -#define SI_QUEUE 2 /* Sent by sigqueue() */ -#define SI_TIMER 3 /* Sent by expiration of a timer_settime() timer */ -#define SI_ASYNCIO 4 /* Indicates completion of asycnhronous IO */ -#define SI_MESGQ 5 /* Indicates arrival of a message at an empty queue */ - -typedef struct { - int si_signo; /* Signal number */ - int si_code; /* Cause of the signal */ - union sigval si_value; /* Signal value */ -} siginfo_t; - -/* - * 3.3.4 Examine and Change Signal Action, P1003.1b-1993, p. 70 - */ - -/* sa_flags values */ - -#define SA_NOCLDSTOP 1 /* Do not generate SIGCHLD when children stop */ -#define SA_SIGINFO 2 /* Invoke the signal catching function with */ - /* three arguments instead of one. */ - -/* - * Data Structure Notes: - * - * (1) Routines stored in sa_handler should take a single int as - * there argument although the POSIX standard does not require this. - * (2) The fields sa_handler and sa_sigaction may overlap, and a conforming - * application should not use both simultaneously. - * - * NOTE: In this implementation, macros are provided to access into the - * union. - */ - -struct sigaction { - int sa_flags; /* Special flags to affect behavior of signal */ - sigset_t sa_mask; /* Additional set of signals to be blocked */ - /* during execution of signal-catching */ - /* function. */ - union { - void (*_handler)(); /* SIG_DFL, SIG_IGN, or pointer to a function */ - void (*_sigaction)( int, siginfo_t *, void * ); - } _signal_handlers; -}; - -#define sa_handler _signal_handlers._handler -#define sa_sigaction _signal_handlers._sigaction - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ diff --git a/newlib/libc/sys/rtems/sys/signal.h b/newlib/libc/sys/rtems/sys/signal.h deleted file mode 100644 index 0aefbae6a..000000000 --- a/newlib/libc/sys/rtems/sys/signal.h +++ /dev/null @@ -1,6 +0,0 @@ -/* - * Is <sys/signal.h> really necessary for RTEMS? - * - * For sure we want to keep newlib's default version out of the install - * so this empty file helps out in that regards. - */ diff --git a/newlib/libc/sys/rtems/sys/time.h b/newlib/libc/sys/rtems/sys/time.h deleted file mode 100644 index ea3325772..000000000 --- a/newlib/libc/sys/rtems/sys/time.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - * $Id$ - */ - -#include <sys/types.h> - -#ifndef __POSIX_SYS_TIME_h -#define __POSIX_SYS_TIME_h - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * Get the CPU dependent types for clock_t and time_t - * - * NOTE: These must be visible by including <time.h>. - */ - -/* Get _CLOCK_T_ and _TIME_T_. */ -#include <machine/types.h> - -#ifndef __clock_t_defined -typedef _CLOCK_T_ clock_t; -#define __clock_t_defined -#endif - -#ifndef __time_t_defined -typedef _TIME_T_ time_t; -#define __time_t_defined -#endif - -/* - * 14.1.1 Time Value Specification Structures, P1003.1b-1993, p. 261 - */ - -struct timespec { - time_t tv_sec; /* Seconds */ - long tv_nsec; /* Nanoseconds */ -}; - -struct itimerspec { - struct timespec it_interval; /* Timer period */ - struct timespec it_value; /* Timer expiration */ -}; - -/* XXX should really be ifdef'ed */ - -/* - * BSD based stuff - */ - -struct timezone { - int tz_minuteswest; - int tz_dsttime; -}; - -struct timeval { - int tv_sec; - int tv_usec; -}; - -int gettimeofday( - struct timeval *tp, - struct timezone *tzp -); - -/* Convenience macros for operations on timevals. - NOTE: `timercmp' does not work for >= or <=. */ -#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) -#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) -#define timercmp(a, b, CMP) \ - (((a)->tv_sec == (b)->tv_sec) ? \ - ((a)->tv_usec CMP (b)->tv_usec) : \ - ((a)->tv_sec CMP (b)->tv_sec)) -#define timeradd(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ - if ((result)->tv_usec >= 1000000) \ - { \ - ++(result)->tv_sec; \ - (result)->tv_usec -= 1000000; \ - } \ - } while (0) -#define timersub(a, b, result) \ - do { \ - (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ - (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ - if ((result)->tv_usec < 0) { \ - --(result)->tv_sec; \ - (result)->tv_usec += 1000000; \ - } \ - } while (0) -#ifdef __cplusplus -} -#endif - -#endif -/* end of include */ diff --git a/newlib/libc/sys/rtems/sys/times.h b/newlib/libc/sys/rtems/sys/times.h deleted file mode 100644 index 3b8599d30..000000000 --- a/newlib/libc/sys/rtems/sys/times.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * $Id$ - */ - -#ifndef __POSIX_SYS_TIMES_h -#define __POSIX_SYS_TIMES_h - -#ifdef __cplusplus -extern "C" { -#endif - -#include <sys/types.h> - -/* - * 4.5.2 Get Process Times, P1003.1b-1993, p. 92 - */ - -struct tms { - clock_t tms_utime; /* User CPU time */ - clock_t tms_stime; /* System CPU time */ - clock_t tms_cutime; /* User CPU time of terminated child processes */ - clock_t tms_cstime; /* System CPU time of terminated child processes */ -}; - -#ifdef __cplusplus -} -#endif - -#endif -/* end of include file */ - |