Elimate use of the non-standard type systime_t and replace it the equivalent, standard type clock_t

Squashed commit of the following:

    sched:  Rename all use of system_t to clock_t.
    syscall:  Rename all use of system_t to clock_t.
    net:  Rename all use of system_t to clock_t.
    libs:  Rename all use of system_t to clock_t.
    fs:  Rename all use of system_t to clock_t.
    drivers:  Rename all use of system_t to clock_t.
    arch:  Rename all use of system_t to clock_t.
    include:  Remove definition of systime_t; rename all use of system_t to clock_t.
This commit is contained in:
Gregory Nutt
2018-06-16 12:16:13 -06:00
parent 450e0809de
commit 8fdbb1e0a4
85 changed files with 274 additions and 271 deletions
+3 -3
View File
@@ -98,10 +98,10 @@ void weak_function clock_timer(void);
int clock_abstime2ticks(clockid_t clockid,
FAR const struct timespec *abstime,
FAR ssystime_t *ticks);
FAR sclock_t *ticks);
int clock_time2ticks(FAR const struct timespec *reltime,
FAR ssystime_t *ticks);
int clock_ticks2time(ssystime_t ticks, FAR struct timespec *reltime);
FAR sclock_t *ticks);
int clock_ticks2time(sclock_t ticks, FAR struct timespec *reltime);
void clock_timespec_add(FAR const struct timespec *ts1,
FAR const struct timespec *ts2,
FAR struct timespec *ts3);
+1 -1
View File
@@ -99,7 +99,7 @@ static long compare_timespec(FAR const struct timespec *a,
****************************************************************************/
int clock_abstime2ticks(clockid_t clockid, FAR const struct timespec *abstime,
FAR ssystime_t *ticks)
FAR sclock_t *ticks)
{
struct timespec currtime;
struct timespec reltime;
+1 -1
View File
@@ -188,7 +188,7 @@ static void clock_inittime(void)
{
struct timespec ts;
(void)clock_ticks2time((ssystime_t)g_system_timer, &ts);
(void)clock_ticks2time((sclock_t)g_system_timer, &ts);
/* Adjust base time to hide initial timer ticks. */
+4 -4
View File
@@ -88,7 +88,7 @@
*
****************************************************************************/
systime_t clock_systimer(void)
clock_t clock_systimer(void)
{
#ifdef CONFIG_SCHED_TICKLESS
# ifdef CONFIG_SYSTEM_TIME64
@@ -123,14 +123,14 @@ systime_t clock_systimer(void)
/* Convert to a 64- then a 32-bit value */
tmp = USEC2TICK(1000000 * (uint64_t)ts.tv_sec + (uint64_t)ts.tv_nsec / 1000);
return (systime_t)(tmp & TIMER_MASK32);
return (clock_t)(tmp & TIMER_MASK32);
# endif /* CONFIG_SYSTEM_TIME64 */
#else /* CONFIG_SCHED_TICKLESS */
# ifdef CONFIG_SYSTEM_TIME64
systime_t sample;
systime_t verify;
clock_t sample;
clock_t verify;
/* 64-bit accesses are not atomic on most architectures. The following
* loop samples the 64-bit timer twice and loops in the rare event that
+3 -3
View File
@@ -173,9 +173,9 @@ int clock_systimespec(FAR struct timespec *ts)
uint64_t secs;
uint64_t nsecs;
#else
systime_t msecs;
systime_t secs;
systime_t nsecs;
clock_t msecs;
clock_t secs;
clock_t nsecs;
#endif
/* Get the time since power-on in seconds and milliseconds */
+2 -2
View File
@@ -63,9 +63,9 @@
*
****************************************************************************/
int clock_ticks2time(ssystime_t ticks, FAR struct timespec *reltime)
int clock_ticks2time(sclock_t ticks, FAR struct timespec *reltime)
{
ssystime_t remainder;
sclock_t remainder;
reltime->tv_sec = ticks / TICK_PER_SEC;
remainder = ticks - TICK_PER_SEC * reltime->tv_sec;
+3 -3
View File
@@ -68,7 +68,7 @@
****************************************************************************/
int clock_time2ticks(FAR const struct timespec *reltime,
FAR ssystime_t *ticks)
FAR sclock_t *ticks)
{
#ifdef CONFIG_HAVE_LONG_LONG
int64_t relnsec;
@@ -84,7 +84,7 @@ int clock_time2ticks(FAR const struct timespec *reltime,
* that is greater than or equal to the exact number of tick.
*/
*ticks = (ssystime_t)((relnsec + NSEC_PER_TICK - 1) / NSEC_PER_TICK);
*ticks = (sclock_t)((relnsec + NSEC_PER_TICK - 1) / NSEC_PER_TICK);
return OK;
#else
int32_t relusec;
@@ -111,7 +111,7 @@ int clock_time2ticks(FAR const struct timespec *reltime,
* that is greater than or equal to the exact number of tick.
*/
*ticks = (ssystime_t)((relusec + USEC_PER_TICK - 1) / USEC_PER_TICK);
*ticks = (sclock_t)((relusec + USEC_PER_TICK - 1) / USEC_PER_TICK);
return OK;
#endif
}