From 412dbff629308745d967718fbd91e272c91b055c Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 5 Apr 2007 21:17:27 +0000 Subject: 2007-04-05 Joel Sherrill * posix/Makefile.am, posix/include/rtems/posix/time.h, posix/src/adjtime.c, posix/src/alarm.c, posix/src/clockgetres.c, posix/src/condtimedwait.c, posix/src/mqueuetimedreceive.c, posix/src/mqueuetimedsend.c, posix/src/mutextimedlock.c, posix/src/nanosleep.c, posix/src/posixtimespecabsolutetimeout.c, posix/src/pthread.c, posix/src/pthreadcreate.c, posix/src/pthreadsetschedparam.c, posix/src/ptimer1.c, posix/src/sched.c, posix/src/semtimedwait.c, posix/src/sigtimedwait.c, posix/src/ualarm.c, rtems/src/clocktodtoseconds.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/tod.h, score/inline/rtems/score/tod.inl, score/src/coretod.c, score/src/coretodget.c, score/src/coretodgetuptime.c, score/src/coretodset.c, score/src/coretodtickle.c: Provide timespec manipulation routines in the SuperCore. Use them everywhere possible. This lead to significant cleanup in the API routines and eliminated some of the same code from the POSIX API. At this point, the SuperCore keeps time in POSIX timespec format properly from 1970. You just cannot set it before 1988 in keeping with RTEMS traditional behavior. * score/include/rtems/score/timespec.h, score/src/timespecaddto.c, score/src/timespecfromticks.c, score/src/timespecisvalid.c, score/src/timespeclessthan.c, score/src/timespecsubtract.c, score/src/timespectoticks.c: New files. * posix/src/posixintervaltotimespec.c, posix/src/posixtimespecsubtract.c, posix/src/posixtimespectointerval.c: Removed. --- cpukit/score/inline/rtems/score/tod.inl | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'cpukit/score/inline') diff --git a/cpukit/score/inline/rtems/score/tod.inl b/cpukit/score/inline/rtems/score/tod.inl index 10a370f7f2..fbfd7037de 100644 --- a/cpukit/score/inline/rtems/score/tod.inl +++ b/cpukit/score/inline/rtems/score/tod.inl @@ -26,34 +26,6 @@ * @{ */ -/** - * - * This routines adds two timespecs. The second argument is added - * to the first. - */ - -RTEMS_INLINE_ROUTINE uint32_t _TOD_Add_timespec( - struct timespec *time, - struct timespec *add -) -{ - uint32_t seconds = 0; - - - /* Add the basics */ - time->tv_sec += add->tv_sec; - time->tv_nsec += add->tv_nsec; - - /* Now adjust it so nanoseconds is in range */ - while ( time->tv_nsec >= TOD_NANOSECONDS_PER_SECOND ) { - time->tv_nsec -= TOD_NANOSECONDS_PER_SECOND; - time->tv_sec++; - seconds++; - } - - return seconds; -} - /** * This routine deactivates updating of the current time of day. */ -- cgit v1.2.3