mirror of
https://github.com/apache/nuttx.git
synced 2026-06-05 15:58:59 +08:00
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:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user