Function report | 
Source Code:kernel\power\wakelock.c | 
Create Date:2022-07-28 10:04:23 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:wakelock_lookup_add
Proto:static struct wakelock *wakelock_lookup_add(const char *name, size_t len, bool add_if_not_found)
Type:struct wakelock
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| const char * | name | |
| size_t | len | |
| bool | add_if_not_found | 
| 163 | If diff == 0 Then | 
| 174 | If Not add_if_not_found Then Return ERR_PTR( - EINVAL) | 
| 177 | If wakelocks_limit_exceeded() Then Return ERR_PTR( - ENOSPC) | 
| 181 | wl = kzalloc - allocate memory. The memory is set to zero.*@size: how many bytes of memory are required.*@flags: the type of memory to allocate (see kmalloc). | 
| 185 | name = kstrndup(name, len, GFP_KERNEL) | 
| 186 | If Not name Then | 
| 191 | ws = wakeup_source_register(NULL, name) | 
| 192 | If Not ws Then | 
| 199 | rb_link_node( & node, parent, node) | 
| 200 | rb_insert_color( & node, & wakelocks_tree) | 
| 201 | wakelocks_lru_add(wl) | 
| 203 | Return wl | 
| Name | Describe | 
|---|---|
| pm_wake_lock | |
| pm_wake_unlock | 
| 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  |