Function report | 
Source Code:kernel\printk\printk.c | 
Create Date:2022-07-28 10:06:34 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:sole_trylock_spinning - try to get console_lock by busy waiting* This allows to busy wait for the console_lock when the current* owner is running in specially marked sections. It means that* the current owner is running and cannot reschedule until it
Proto:static int console_trylock_spinning(void)
Type:int
Parameter:Nothing
| 1711 | struct task_struct * owner = NULL | 
| 1713 | bool spin = false | 
| 1721 | raw_spin_lock( & console_owner_lock) | 
| 1722 | owner = READ_ONCE(console_owner) | 
| 1723 | waiter = READ_ONCE(console_waiter) | 
| 1724 | If Not waiter && owner && owner != current process Then | 
| 1725 | WRITE_ONCE(console_waiter, true) | 
| 1726 | spin = true | 
| 1728 | raw_spin_unlock( & console_owner_lock) | 
| 1739 | If Not spin Then | 
| 1741 | Return 0 | 
| 1745 | spin_acquire( & console_owner_dep_map, 0, 0, _THIS_IP_) | 
| 1747 | When READ_ONCE(console_waiter) cycle | 
| 1748 | cpu_relax() | 
| 1749 | spin_release( & console_owner_dep_map, _THIS_IP_) | 
| 1758 | mutex_acquire( & console_lock_dep_map, 0, 1, _THIS_IP_) | 
| 1760 | Return 1 | 
| Name | Describe | 
|---|---|
| vprintk_emit | 
| 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  |