Function report | 
Source Code:kernel\locking\mutex.c | 
Create Date:2022-07-28 09:47:15 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Trylock variant that retuns the owning task on failure.
Proto:static inline struct task_struct *__mutex_trylock_or_owner(struct mutex *lock)
Type:struct task_struct
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct mutex * | lock | 
| 109 | curr = current process | 
| 111 | owner = atomic_long_read( & owner) | 
| 112 | cycle | 
| 113 | flags = __owner_flags(owner) | 
| 114 | task = owner & ~MUTEX_FLAGS | 
| 116 | If task Then | 
| 117 | If Value is more likely to compile time(task != curr) Then Break | 
| 120 | If Value is more likely to compile time(!(flags & MUTEX_FLAG_PICKUP)) Then Break | 
| 123 | flags &= ~MUTEX_FLAG_PICKUP | 
| 124 | Else flags &= ~MUTEX_FLAG_HANDOFF | 
| 144 | Return __owner_task(owner) | 
| Name | Describe | 
|---|---|
| __mutex_trylock | Actual trylock that will work on any unlocked state. | 
| 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  |