Skip to content

Commit 9c97f7a

Browse files
anchaoxiaoxiang781216
authored andcommitted
sched/cpuload: move g_cpuload_wdog to private chapter
coding style Signed-off-by: chao an <[email protected]>
1 parent 5fb0c44 commit 9c97f7a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

sched/sched/sched_cpuload.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@
8686

8787
volatile clock_t g_cpuload_total;
8888

89+
/****************************************************************************
90+
* Private Data
91+
****************************************************************************/
92+
93+
#ifdef CONFIG_SCHED_CPULOAD_SYSCLK
94+
static struct wdog_s g_cpuload_wdog;
95+
#endif
96+
8997
/****************************************************************************
9098
* Private Functions
9199
****************************************************************************/
@@ -279,7 +287,6 @@ int clock_cpuload(int pid, FAR struct cpuload_s *cpuload)
279287
#ifdef CONFIG_SCHED_CPULOAD_SYSCLK
280288
void cpuload_init(void)
281289
{
282-
static struct wdog_s g_cpuload_wdog;
283290
wd_start(&g_cpuload_wdog, CPULOAD_SAMPLING_PERIOD, cpuload_callback,
284291
(wdparm_t)&g_cpuload_wdog);
285292
}

0 commit comments

Comments
 (0)