sched/clock: Remove CLOCK_MONOTONIC option from Kconfig

here is the reason:
1.clock_systime_timespec(core function) always exist regardless the setting
2.CLOCK_MONOTONIC is a foundamental clock type required by many places

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-02-15 13:53:18 +08:00
committed by Xiang Xiao
parent 7b00c8bdb8
commit f1ed349dd9
28 changed files with 35 additions and 170 deletions
-9
View File
@@ -387,12 +387,7 @@ int epoll_pwait(int epfd, FAR struct epoll_event *evs,
expire.tv_sec = timeout / 1000;
expire.tv_nsec = timeout % 1000 * 1000;
#ifdef CONFIG_CLOCK_MONOTONIC
clock_gettime(CLOCK_MONOTONIC, &curr);
#else
clock_gettime(CLOCK_REALTIME, &curr);
#endif
clock_timespec_add(&curr, &expire, &expire);
}
@@ -403,11 +398,7 @@ again:
}
else
{
#ifdef CONFIG_CLOCK_MONOTONIC
clock_gettime(CLOCK_MONOTONIC, &curr);
#else
clock_gettime(CLOCK_REALTIME, &curr);
#endif
clock_timespec_subtract(&expire, &curr, &diff);
rc = ppoll(eph->poll, eph->occupied + 1, &diff, sigmask);
+3 -6
View File
@@ -540,12 +540,9 @@ int timerfd_create(int clockid, int flags)
/* Sanity checks. */
if (clockid != CLOCK_REALTIME
#ifdef CONFIG_CLOCK_MONOTONIC
&& clockid != CLOCK_MONOTONIC
&& clockid != CLOCK_BOOTTIME
#endif /* CONFIG_CLOCK_MONOTONIC */
)
if (clockid != CLOCK_REALTIME &&
clockid != CLOCK_MONOTONIC &&
clockid != CLOCK_BOOTTIME)
{
ret = -EINVAL;
goto errout;