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
-11
View File
@@ -85,17 +85,6 @@ struct critmon_file_s
char line[CRITMON_LINELEN]; /* Pre-allocated buffer for formatted lines */
};
/****************************************************************************
* External Function Prototypes
****************************************************************************/
/* If CONFIG_SCHED_CRITMONITOR is selected, then platform-specific logic
* must provide the following interface. This function converts platform-
* specific elapsed time into a well-known time format.
*/
void up_critmon_convert(uint32_t elapsed, FAR struct timespec *ts);
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
-14
View File
@@ -174,20 +174,6 @@ static FAR const char *g_policy[4] =
"SCHED_FIFO", "SCHED_RR", "SCHED_SPORADIC", "SCHED_OTHER"
};
/****************************************************************************
* External Function Prototypes
****************************************************************************/
#ifdef CONFIG_SCHED_CRITMONITOR
/* If CONFIG_SCHED_CRITMONITOR is selected, then platform-specific logic
* must provide the following interface. This interface simply converts an
* elapsed time into well known units for presentation by the ProcFS file
* system..
*/
void up_critmon_convert(uint32_t starttime, FAR struct timespec *ts);
#endif
/****************************************************************************
* Private Function Prototypes
****************************************************************************/