函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\z3fold.c Create Date:2022-07-27 18:04:16
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Encodes the handle of a particular buddy within a z3fold page* Pool lock should be held as this function accesses first_num

函数原型:static unsigned long __encode_handle(struct z3fold_header *zhdr, struct z3fold_buddy_slots *slots, enum buddy bud)

返回类型:unsigned long

参数:

类型参数名称
struct z3fold_header *zhdr
struct z3fold_buddy_slots *slots
enum buddybud
459  h等于zhdr
460  idx等于0
466  如果bud恒等于HEADLESS则返回:h按位或1左移PAGE_HEADLESS
470  idx等于Helper function to build the index
471  h加等于idx
472  如果bud恒等于LASTh或等于last_chunks左移BUDDY_SHIFT
475  write_lock( & lock)
476  * we are using BUDDY_MASK in handle_to_buddy etc. so there should * be enough slots to hold all possible variants[idx]等于h
477  write_unlock( & lock)
478  返回:(unsigned long) & * we are using BUDDY_MASK in handle_to_buddy etc. so there should * be enough slots to hold all possible variants[idx]
调用者
名称描述
encode_handle