cpuload:testing program compile error when use CONFIG_SCHED_CPULOAD_SYSCLK
log: CC: setjmp.c cpuload_main.c: In function ‘cpuload_main’: cpuload_main.c:38:45: error: ‘CONFIG_SCHED_CPULOAD_TICKSPERSEC’ undeclared (first use in this function); did you mean ‘CONFIG_SCHED_CPULOAD_TIMECONSTANT’? 38 | #define CPULOAD_US (USEC_PER_SEC / CONFIG_SCHED_CPULOAD_TICKSPERSEC) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cpuload_main.c:42:35: note: in expansion of macro ‘CPULOAD_US’ 42 | #define CPULOAD_DELAY (10 * CPULOAD_US) Signed-off-by: dulibo1 <dulibo1@xiaomi.com> Signed-off-by: buxiasen <buxiasen@xiaomi.com>
This commit is contained in:
parent
60aea922a5
commit
92b916ab47
@ -34,7 +34,12 @@
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
|
||||
#define CPULOAD_US (USEC_PER_SEC / CONFIG_SCHED_CPULOAD_TICKSPERSEC)
|
||||
#ifdef CONFIG_SCHED_CPULOAD_EXTCLK
|
||||
# define CPULOAD_US (USEC_PER_SEC / CONFIG_SCHED_CPULOAD_TICKSPERSEC)
|
||||
#else
|
||||
# define CPULOAD_US (USEC_PER_SEC / CLOCKS_PER_SEC)
|
||||
#endif
|
||||
|
||||
#define CPULOAD_DELAY (10 * CPULOAD_US)
|
||||
|
||||
/****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user