summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-03 16:29:59 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-06-03 16:29:59 +0000
commit5ff991e8a52c276921f924cc6b55e6a80faf7983 (patch)
treee3e42c474426cd2ff812b2a0edf183cbfb29cde5 /c
parentadded constant for seconds between posix epoch (1970) and rtems epoch (1988). (diff)
downloadrtems-5ff991e8a52c276921f924cc6b55e6a80faf7983.tar.bz2
created ptimer.c and moved the timer_* routines out of time.c into ptimer.c
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/posix/src/ptimer.c75
-rw-r--r--c/src/exec/posix/src/time.c59
2 files changed, 76 insertions, 58 deletions
diff --git a/c/src/exec/posix/src/ptimer.c b/c/src/exec/posix/src/ptimer.c
new file mode 100644
index 0000000000..0446a7a683
--- /dev/null
+++ b/c/src/exec/posix/src/ptimer.c
@@ -0,0 +1,75 @@
+/*
+ * $Id$
+ */
+
+#include <assert.h>
+#include <time.h>
+#include <errno.h>
+
+#include <rtems/system.h>
+#include <rtems/score/isr.h>
+#include <rtems/score/thread.h>
+#include <rtems/score/tod.h>
+
+#include <rtems/posix/time.h>
+
+/*
+ * 14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264
+ */
+
+int timer_create(
+ clockid_t clock_id,
+ struct sigevent *evp,
+ timer_t *timerid
+)
+{
+ return POSIX_NOT_IMPLEMENTED();
+}
+
+/*
+ * 14.2.3 Delete a Per_process Timer, P1003.1b-1993, p. 266
+ */
+
+int timer_delete(
+ timer_t timerid
+)
+{
+ return POSIX_NOT_IMPLEMENTED();
+}
+
+/*
+ * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
+ */
+
+int timer_settime(
+ timer_t timerid,
+ int flags,
+ const struct itimerspec *value,
+ struct itimerspec *ovalue
+)
+{
+ return POSIX_NOT_IMPLEMENTED();
+}
+
+/*
+ * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
+ */
+
+int timer_gettime(
+ timer_t timerid,
+ struct itimerspec *value
+)
+{
+ return POSIX_NOT_IMPLEMENTED();
+}
+
+/*
+ * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
+ */
+
+int timer_getoverrun(
+ timer_t timerid
+)
+{
+ return POSIX_NOT_IMPLEMENTED();
+}
diff --git a/c/src/exec/posix/src/time.c b/c/src/exec/posix/src/time.c
index 945a550296..9284bfac44 100644
--- a/c/src/exec/posix/src/time.c
+++ b/c/src/exec/posix/src/time.c
@@ -11,14 +11,7 @@
#include <rtems/score/thread.h>
#include <rtems/score/tod.h>
-/*
- * Seconds from January 1, 1970 to January 1, 1988. Used to account for
- * differences between POSIX API and RTEMS core.
- */
-
-#define POSIX_TIME_SECONDS_1970_THROUGH_1988 \
- (((1987 - 1970 + 1) * TOD_SECONDS_PER_NON_LEAP_YEAR) + \
- (4 * TOD_SECONDS_PER_DAY))
+#include <rtems/posix/time.h>
/*
* _POSIX_Time_Spec_to_interval
@@ -227,56 +220,6 @@ int clock_getres(
}
/*
- * 14.2.2 Create a Per-Process Timer, P1003.1b-1993, p. 264
- */
-
-int timer_create(
- clockid_t clock_id,
- struct sigevent *evp,
- timer_t *timerid
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*
- * 14.2.3 Delete a Per_process Timer, P1003.1b-1993, p. 266
- */
-
-int timer_delete(
- timer_t timerid
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*
- * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
- */
-
-int timer_settime(
- timer_t timerid,
- int flags,
- const struct itimerspec *value,
- struct itimerspec *ovalue
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*
- * 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
- */
-
-int timer_gettime(
- timer_t timerid,
- struct itimerspec *value
-)
-{
- return POSIX_NOT_IMPLEMENTED();
-}
-
-/*
* 14.2.4 Per-Process Timers, P1003.1b-1993, p. 267
*/