函数逻辑报告 |
Source Code:kernel\time\timer.c |
Create Date:2022-07-27 11:39:39 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:__mod_timer
函数原型:static inline int __mod_timer(struct timer_list *timer, unsigned long expires, unsigned int options)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
struct timer_list * | timer | |
unsigned long | expires | |
unsigned int | options |
953 | clk等于0 |
954 | ret等于0 |
971 | 如果非diff则返回:1 |
973 | 如果options按位与MOD_TIMER_REDUCE且diff小于等于0则返回:1 |
983 | forward_timer_base(base) |
987 | ret等于1 |
988 | 转到:out_unlock |
992 | idx等于calc_wheel_index(expires, clk) |
999 | 如果idx恒等于timer_get_idx(timer)则 |
1000 | 如果非options按位与MOD_TIMER_REDUCE的值则expires等于expires |
1004 | ret等于1 |
1005 | 转到:out_unlock |
1007 | 否则 |
1009 | forward_timer_base(base) |
1012 | ret等于detach_if_pending(timer, base, false) |
1013 | 如果非ret且options按位与MOD_TIMER_PENDING_ONLY则转到:out_unlock |
1016 | new_base等于get_target_base(base, flags) |
1026 | 如果此条件成立可能性大(为编译器优化)(running_timer != timer)则 |
1028 | flags或等于TIMER_MIGRATING |
1030 | raw_spin_unlock( & lock) |
1032 | raw_spin_lock( & lock) |
1033 | WRITE_ONCE(flags, (flags & ~TIMER_BASEMASK) | cpu) |
1035 | forward_timer_base(base) |
1039 | debug_timer_activate(timer) |
1051 | trigger_dyntick_cpu(base, timer) |
1052 | 否则 |
1053 | internal_add_timer(base, timer) |
1056 | out_unlock : |
1057 | raw_spin_unlock_irqrestore( & lock, flags) |
1059 | 返回:ret |
名称 | 描述 |
---|---|
mod_timer_pending | mod_timer_pending - modify a pending timer's timeout*@timer: the pending timer to be modified*@expires: new timeout in jiffies* mod_timer_pending() is the same for pending timers as mod_timer(),* but will not re-activate and modify already deleted timers. |
mod_timer | mod_timer - modify a timer's timeout*@timer: the timer to be modified*@expires: new timeout in jiffies* mod_timer() is a more efficient way to update the expire field of an* active timer (if the timer is inactive it will be activated)* mod_timer(timer, |
timer_reduce | mer_reduce - Modify a timer's timeout if it would reduce the timeout*@timer: The timer to be modified*@expires: New timeout in jiffies* timer_reduce() is very similar to mod_timer(), except that it will only* modify a running timer if that would reduce |
schedule_timeout | schedule_timeout - sleep until timeout*@timeout: timeout value in jiffies* Make the current task sleep until @timeout jiffies have* elapsed |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |