mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-11 08:12:48 +00:00
- Removed cputime_compat.c and ktime_compat.c - Created clock_time_cputime.c for CPU time APIs (clock_cpu_*, rt_cputime_*) - Created clock_time_boottime.c for boottime APIs (rt_boottime_*) - Created stub cputime.h header for BSP compatibility - Removed all compatibility type definitions from clock_time.h - Removed compatibility Kconfig options - Updated SConscript to build new files - Replaced all rt_ktime_hrtimer_* calls with rt_clock_hrtimer_* in ctime.c - Replaced all rt_ktime_* functions with rt_clock_* equivalents - Simplified nanosleep() to use rt_clock_ndelay() directly Co-authored-by: BernardXiong <1241087+BernardXiong@users.noreply.github.com>
25 lines
554 B
Python
25 lines
554 B
Python
from building import *
|
|
|
|
cwd = GetCurrentDir()
|
|
|
|
src = Split('''
|
|
src/clock_time.c
|
|
src/hrtimer.c
|
|
src/clock_time_tick.c
|
|
src/clock_time_cputime.c
|
|
src/clock_time_boottime.c
|
|
''')
|
|
|
|
CPPPATH = [cwd + '/include', cwd + '/../include']
|
|
|
|
LOCAL_CCFLAGS = ''
|
|
if rtconfig.PLATFORM in ['gcc', 'armclang']:
|
|
LOCAL_CCFLAGS += ' -std=gnu99'
|
|
elif rtconfig.PLATFORM in ['armcc']:
|
|
LOCAL_CCFLAGS += ' --c99 --gnu'
|
|
|
|
group = DefineGroup('DeviceDrivers', src, depend=['RT_USING_CLOCK_TIME'],
|
|
CPPPATH=CPPPATH, LOCAL_CCFLAGS=LOCAL_CCFLAGS)
|
|
|
|
Return('group')
|