26#if defined(RT_USING_SMART) && defined(RT_USING_VDSO)
31#define rt_tick rt_cpu_index(0)->tick
36#if defined(RT_USING_HOOK) && defined(RT_HOOK_USING_FUNC_PTR)
37static void (*rt_tick_hook)(void);
86#ifdef RT_USING_CPU_USAGE_TRACER
94 thread->user_time += tick;
95 pcpu->cpu_stat.user += tick;
99 thread->system_time += tick;
102 pcpu->cpu_stat.idle += tick;
106 pcpu->cpu_stat.system += tick;
113#define _update_process_times(tick)
184 rt_vdso_update_glob_time();
208#if RT_TICK_PER_SECOND == 1000u
211 tick = RT_TICK_PER_SECOND * (ms / 1000);
212 tick += (RT_TICK_PER_SECOND * (ms % 1000) + 999) / 1000;
232#if RT_TICK_PER_SECOND == 0
233#error "RT_TICK_PER_SECOND must be greater than zero"
236#if 1000 % RT_TICK_PER_SECOND == 0u
237 return rt_tick_get() * (1000u / RT_TICK_PER_SECOND);
239 #warning "rt-thread cannot provide a correct 1ms-based tick any longer,\
240 please redefine this function in another file by using a high-precision hard-timer."
struct rt_cpu * rt_cpu_self(void)
This fucntion will return current cpu object.
void rt_tick_increase(void)
This function will notify kernel there is one tick passed. Normally, this function is invoked by cloc...
void rt_timer_check(void)
This function will check timer list, if a timeout event happens, the corresponding timeout function w...
void rt_tick_increase_tick(rt_tick_t tick)
This function will notify kernel there is n tick passed. Normally, this function is invoked by clock ...
rt_tick_t rt_tick_get(void)
This function will return current tick from operating system startup.
#define _update_process_times(tick)
rt_weak rt_tick_t rt_tick_get_millisecond(void)
This function will return the passed millisecond from boot.
void rt_tick_set(rt_tick_t tick)
This function will set current tick.
rt_tick_t rt_tick_from_millisecond(rt_int32_t ms)
This function will calculate the tick from millisecond.
void rt_tick_sethook(void(*hook)(void))
#define RT_WAITING_FOREVER
rt_weak rt_uint8_t rt_interrupt_get_nest(void)
This function will return the nest of interrupt.
#define RT_OBJECT_HOOK_CALL(func, argv)
rt_thread_t rt_thread_self(void)
This function will return self thread object.
#define LWP_IS_USER_MODE(t)
#define rt_atomic_add(ptr, v)
#define rt_atomic_store(ptr, v)
#define rt_atomic_load(ptr)
#define RTM_EXPORT(symbol)
rt_err_t rt_sched_tick_increase(rt_tick_t tick)
struct rt_thread * idle_thread