Function report |
Source Code:kernel\locking\semaphore.c |
Create Date:2022-07-28 09:47:46 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:down_timeout - acquire the semaphore within a specified time*@sem: the semaphore to be acquired*@timeout: how long to wait before failing* Attempts to acquire the semaphore. If no more tasks are allowed to
Proto:int down_timeout(struct semaphore *sem, long timeout)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct semaphore * | sem | |
| long | timeout |
| 158 | result = 0 |
| 160 | raw_spin_lock_irqsave( & lock, flags) |
| 161 | If Value is more likely to compile time(count > 0) Then count-- |
| 163 | Else result = __down_timeout(sem, timeout) |
| 165 | raw_spin_unlock_irqrestore( & lock, flags) |
| 167 | Return result |
| 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 |