pkarashchenko commented on code in PR #6866:
URL: https://github.com/apache/incubator-nuttx/pull/6866#discussion_r949471638


##########
include/nuttx/arch.h:
##########
@@ -2278,7 +2253,8 @@ void weak_function nxsched_process_cpuload(void);
  ****************************************************************************/
 
 #if defined(CONFIG_SCHED_CPULOAD) && defined(CONFIG_SCHED_CPULOAD_EXTCLK)
-void weak_function nxsched_process_cpuload_ticks(uint32_t ticks);
+void nxsched_process_cpuload_ticks(uint32_t ticks);
+#  define nxsched_process_cpuload() nxsched_process_cpuload_ticks(1)

Review Comment:
   Or even
   ```
   /* CPU load measurement support */
   
   #ifdef CONFIG_SCHED_CPULOAD
   void nxsched_process_cpuload_ticks(uint32_t ticks);
   #else
   #  define nxsched_process_cpuload_ticks(ticks)
   #endif
   
   #define nxsched_process_cpuload() nxsched_process_cpuload_ticks(1)
   ```
   
   I mean that in `include/nuttx/arch.h` the `# define 
nxsched_process_cpuload() nxsched_process_cpuload_ticks(1)` in case if 
`CONFIG_SCHED_CPULOAD_EXTCLK` is defined and in `sched/sched/sched.h` the `# 
define nxsched_process_cpuload() nxsched_process_cpuload_ticks(1)` if 
`CONFIG_SCHED_CPULOAD_EXTCLK` is not defined, so this seems to be duplication 
for me. Am I missing something?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to