| Function report | 
| Source Code: kernel\ucount.c | Create Date:2022-07-28 09:34:13 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:get_ucounts
Proto:static struct ucounts *get_ucounts(struct user_namespace *ns, kuid_t uid)
Type:struct ucounts
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct user_namespace * | ns | |
| kuid_t | uid | 
| 127 | hashent = ucounts_hashentry(ns, uid) | 
| 130 | spin_lock_irq( & ucounts_lock) | 
| 131 | ucounts = find_ucounts(ns, uid, hashent) | 
| 132 | If Not ucounts Then | 
| 133 | spin_unlock_irq( & ucounts_lock) | 
| 135 | new = 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). | 
| 136 | If Not new Then Return NULL | 
| 141 | count = 0 | 
| 143 | spin_lock_irq( & ucounts_lock) | 
| 144 | ucounts = find_ucounts(ns, uid, hashent) | 
| 145 | If ucounts Then | 
| 147 | Else | 
| 148 | hlist_add_head( & node, hashent) | 
| 154 | Else count += 1 | 
| 156 | spin_unlock_irq( & ucounts_lock) | 
| 157 | Return ucounts | 
| Name | Describe | 
|---|---|
| inc_ucount | 
| 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 |