summaryrefslogtreecommitdiff
path: root/src/thread.c
diff options
context:
space:
mode:
authorgeniusgogo <[email protected]>2023-10-17 13:07:59 +0800
committerGitHub <[email protected]>2023-10-17 13:07:59 +0800
commitecd29fda6005ef19c625f194f9311259ba907a78 (patch)
treed0e272f5783ac4a3048238e14a37bcd88b5dc3e6 /src/thread.c
parent7d64cdcf58969b1b2b7e9cfb3aac9e46cb456ae3 (diff)
Sync dfs lwp (#8123)
Diffstat (limited to 'src/thread.c')
-rw-r--r--src/thread.c4
1 files changed, 4 insertions, 0 deletions
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