Function report | 
Source Code:kernel\time\timer.c | 
Create Date:2022-07-28 10:39:48 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:__mod_timer
Proto:static inline int __mod_timer(struct timer_list *timer, unsigned long expires, unsigned int options)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct timer_list * | timer | |
| unsigned long | expires | |
| unsigned int | options | 
| 953 | clk = 0 | 
| 954 | ret = 0 | 
| 971 | If Not diff Then Return 1 | 
| 973 | If options & MOD_TIMER_REDUCE && diff <= 0 Then Return 1 | 
| 983 | forward_timer_base(base) | 
| 987 | ret = 1 | 
| 988 | Go to out_unlock | 
| 992 | idx = calc_wheel_index(expires, clk) | 
| 999 | If idx == timer_get_idx(timer) Then | 
| 1000 | If Not (options & MOD_TIMER_REDUCE) Then expires = expires | 
| 1004 | ret = 1 | 
| 1005 | Go to out_unlock | 
| 1007 | Else | 
| 1009 | forward_timer_base(base) | 
| 1012 | ret = detach_if_pending(timer, base, false) | 
| 1013 | If Not ret && options & MOD_TIMER_PENDING_ONLY Then Go to out_unlock | 
| 1016 | new_base = get_target_base(base, flags) | 
| 1026 | If Value is more likely to compile time(running_timer != timer) Then | 
| 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 | Else | 
| 1053 | internal_add_timer(base, timer) | 
| 1056 | out_unlock : | 
| 1057 | raw_spin_unlock_irqrestore( & lock, flags) | 
| 1059 | Return ret | 
| Name | Describe | 
|---|---|
| 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 | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |