From ecd29fda6005ef19c625f194f9311259ba907a78 Mon Sep 17 00:00:00 2001 From: geniusgogo <2041245+geniusgogo@users.noreply.github.com> Date: Tue, 17 Oct 2023 13:07:59 +0800 Subject: Sync dfs lwp (#8123) --- src/thread.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/thread.c') diff --git a/src/thread.c b/src/thread.c index 353f2fcf46..334c8803ed 100644 --- a/src/thread.c +++ b/src/thread.c @@ -269,6 +269,10 @@ static rt_err_t _thread_init(struct rt_thread *thread, rt_list_init(&thread->signal.sig_queue.siginfo_list); rt_memset(&thread->user_ctx, 0, sizeof thread->user_ctx); + + /* initialize user_time and system_time */ + thread->user_time = 0; + thread->system_time = 0; #endif #ifdef RT_USING_CPU_USAGE -- cgit v1.3.1