| Function report | 
| Source Code: kernel\locking\semaphore.c | Create Date:2022-07-28 09:47:48 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Because this function is inlined, the 'state' parameter will be* constant, and thus optimised away by the compiler. Likewise the* 'timeout' parameter for the cases without timeouts.
Proto:static inline int __sched __down_common(struct semaphore *sem, long state, long timeout)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct semaphore * | sem | |
| long | state | |
| long | timeout | 
| 210 | task = current process | 
| 211 | up = false | 
| 213 | cycle | 
| 214 | If signal_pending_state(state, current process) Then Go to interrupted | 
| 216 | If Value for the false possibility is greater at compile time(timeout <= 0) Then Go to timed_out | 
| 219 | raw_spin_unlock_irq( & lock) | 
| 220 | timeout = schedule_timeout - sleep until timeout*@timeout: timeout value in jiffies* Make the current task sleep until @timeout jiffies have* elapsed | 
| 221 | raw_spin_lock_irq( & lock) | 
| 222 | If up Then Return 0 | 
| 226 | timed_out : | 
| 228 | Return -ETIME | 
| 230 | interrupted : | 
| 232 | Return -EINTR | 
| Name | Describe | 
|---|---|
| __down | |
| __down_interruptible | |
| __down_killable | |
| __down_timeout | 
| 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 |