sched/sched: Improve sched make and cmake scripts

Improve sched make and cmake scripts to select sched_processtimer.c
  and sched_timerexpiration.c separatly for tickless and non-tickless mode

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
This commit is contained in:
wangchengdong
2026-01-15 00:07:07 +08:00
committed by archer
parent 80fcbf7aa8
commit c025cd96b4
2 changed files with 6 additions and 3 deletions
+3 -2
View File
@@ -48,8 +48,7 @@ set(SRCS
sched_sysinfo.c
sched_get_stateinfo.c
sched_switchcontext.c
sched_sleep.c
sched_processtimer.c)
sched_sleep.c)
if(DEFINED CONFIG_STACKCHECK_MARGIN)
if(NOT CONFIG_STACKCHECK_MARGIN EQUAL -1)
@@ -99,6 +98,8 @@ endif()
if(CONFIG_SCHED_TICKLESS)
list(APPEND SRCS sched_timerexpiration.c)
else()
list(APPEND SRCS sched_processtimer.c)
endif()
if(CONFIG_SCHED_CRITMONITOR)
+3 -1
View File
@@ -30,7 +30,7 @@ CSRCS += sched_yield.c sched_rrgetinterval.c sched_foreach.c
CSRCS += sched_lock.c sched_unlock.c sched_lockcount.c
CSRCS += sched_idletask.c sched_self.c sched_get_stackinfo.c sched_get_tls.c
CSRCS += sched_sysinfo.c sched_get_stateinfo.c sched_getcpu.c
CSRCS += sched_switchcontext.c sched_sleep.c sched_processtimer.c
CSRCS += sched_switchcontext.c sched_sleep.c
ifneq ($(CONFIG_STACKCHECK_MARGIN),)
ifneq ($(CONFIG_STACKCHECK_MARGIN),-1)
@@ -80,6 +80,8 @@ endif
ifeq ($(CONFIG_SCHED_TICKLESS),y)
CSRCS += sched_timerexpiration.c
else
CSRCS += sched_processtimer.c
endif
ifeq ($(CONFIG_SCHED_CRITMONITOR),y)