Function report | 
Source Code:kernel\locking\lockdep.c | 
Create Date:2022-07-28 09:49:37 | 
| Last Modify:2020-03-17 14:16:01 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:Static locks do not have their class-keys yet - for them the key is* the lock object itself. If the lock is in the per cpu area, the* canonical address of the lock (per cpu offset removed) is used.
Proto:static bool assign_lock_key(struct lockdep_map *lock)
Type:bool
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct lockdep_map * | lock | 
| 865 | BUILD_BUG_ON - break compile if a condition is true(sizeof(structlock_class_key) > sizeof(raw_spinlock_t)) | 
| 868 | If __is_kernel_percpu_address(addr, & can_addr) Then key = can_addr | 
| 870 | Else if __is_module_percpu_address(addr, & can_addr) Then key = can_addr | 
| 872 | Else if Is this the address of a static object: Then key = lock | 
| 874 | Else | 
| 877 | pr_err("INFO: trying to register non-static key.\n") | 
| 878 | pr_err("the code is fine but needs lockdep annotation.\n") | 
| 879 | pr_err("turning off the locking correctness validator.\n") | 
| 880 | dump_stack() | 
| 881 | Return false | 
| 884 | Return true | 
| Name | Describe | 
|---|---|
| register_lock_class | Register a lock's class in the hash-table, if the class is not present* yet. Otherwise we look it up. We cache the result in the lock object* itself, so actual lookup of the hash should be once per lock object. | 
| 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  |