Critical Section Monitor (sched/ and fs/procfs: Remove SCHED_IRQMONITOR_GETTIME to simplify the clock source selection: (1) Use up_critmon_gettime if SCHED_IRQMONITOR, (2) Call clock_systimespec if SCHED_TICKLESS, (3) Don't collect timing info for all other cases and move up_critmon_* to arch.h avoid the duplicated declaration.

This commit is contained in:
Xiang Xiao
2019-01-27 10:13:28 -06:00
committed by Gregory Nutt
parent 1c75aa76f0
commit e57f7cf6ae
6 changed files with 46 additions and 139 deletions
+24
View File
@@ -2400,6 +2400,30 @@ void arch_sporadic_suspend(FAR struct tcb_s *tcb);
void arch_sporadic_resume(FAR struct tcb_s *tcb);
#endif
/********************************************************************************
* Name: up_critmon_*
*
* Description:
* The first interface simply provides the current time value in unknown
* units. NOTE: This function may be called early before the timer has
* been initialized. In that event, the function should just return a
* start time of zero.
*
* Nothing is assumed about the units of this time value. The following
* are assumed, however: (1) The time is an unsigned integer value, (2)
* the time is monotonically increasing, and (3) the elapsed time (also
* in unknown units) can be obtained by subtracting a start time from
* the current time.
*
* The second interface simple converts an elapsed time into well known
* units.
********************************************************************************/
#ifdef CONFIG_SCHED_CRITMONITOR
uint32_t up_critmon_gettime(void);
void up_critmon_convert(uint32_t elapsed, FAR struct timespec *ts);
#endif
#undef EXTERN
#if defined(__cplusplus)
}