函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\jump_label.c Create Date:2022-07-27 15:10:34
Last Modify:2020-03-17 20:59:06 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:设置初始化标志

函数原型:void __init jump_label_init(void)

返回类型:void

参数:

455  iter_start等于__start___jump_table
456  iter_stop等于__stop___jump_table
457  struct static_key * key = NULL
466  BUILD_BUG_ON - break compile if a condition is true((int)Atomic operations that C can't guarantee us. Useful for* resource counting etc..(0) != 0)
467  BUILD_BUG_ON - break compile if a condition is true((int)Atomic operations that C can't guarantee us. Useful for* resource counting etc..(1) != 1)
469  如果static_key_initialized则返回
472  cpus_read_lock()
473  jump_label_lock()
474  jump_label_sort_entries(iter_start, iter_stop)
476 iter小于iter_stop循环
480  如果jump_label_type(iter)恒等于JUMP_LABEL_NOPUpdate code which is definitely not currently executing.* Architectures which need heavyweight synchronization to modify* running code can override this to make the non-live update case* cheaper.
483  如果_section_contains - checks if an object is contained within the init* section*@virt: virtual address of the memory object*@size: size of the memory object* Returns: true if the object specified by @virt and @size is entirelyjump_entry_set_init(iter)
486  iterk等于jump_entry_key(iter)
487  如果iterk恒等于key则继续下一循环
490  key等于iterk
491  A 'struct static_key' uses a union such that it either points directly* to a table of 'struct jump_entry' or to a linked list of modules which in* turn point to 'struct jump_entry' tables
493  static_key_initialized = true
494  jump_label_unlock()
495  cpus_read_unlock()