summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src/clockgettime.c
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2011-05-16 13:55:17 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2011-05-16 13:55:17 +0000
commit5153d879c9cca60bd6630e5e8aa2cbf2abd1ac38 (patch)
treee5256e37e9f26ca89b46f4d64c49919af35af279 /cpukit/posix/src/clockgettime.c
parentHousekeeping (diff)
downloadrtems-5153d879c9cca60bd6630e5e8aa2cbf2abd1ac38.tar.bz2
2011-05-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* posix/Makefile.am: Add posixtime.h. * posix/src/clockgetres.c, posix/src/clockgettime.c, posix/src/clocksettime.c: Use CLOCK_PROCESS_CPUTIME_ID, CLOCK_THREAD_CPUTIME_ID. Include posix/src/posixtime.h. * posix/src/posixtime.h: New.
Diffstat (limited to 'cpukit/posix/src/clockgettime.c')
-rw-r--r--cpukit/posix/src/clockgettime.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpukit/posix/src/clockgettime.c b/cpukit/posix/src/clockgettime.c
index 852ac8e039..5b0b6eebeb 100644
--- a/cpukit/posix/src/clockgettime.c
+++ b/cpukit/posix/src/clockgettime.c
@@ -23,6 +23,8 @@
#include <rtems/seterr.h>
+#include "posixtime.h"
+
/*PAGE
*
* 14.2.1 Clocks, P1003.1b-1993, p. 263
@@ -48,14 +50,14 @@ int clock_gettime(
#endif
#ifdef _POSIX_CPUTIME
- if ( clock_id == CLOCK_PROCESS_CPUTIME ) {
+ if ( clock_id == CLOCK_PROCESS_CPUTIME_ID ) {
_TOD_Get_uptime_as_timespec( tp );
return 0;
}
#endif
#ifdef _POSIX_THREAD_CPUTIME
- if ( clock_id == CLOCK_THREAD_CPUTIME )
+ if ( clock_id == CLOCK_THREAD_CPUTIME_ID )
rtems_set_errno_and_return_minus_one( ENOSYS );
#endif