函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\file.c Create Date:2022-07-29 10:38:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Copy 'count' fd bits from the old table to the new table and clear the extra* space if any. This does not copy the file pointers. Called with the files* spinlock held for write.

函数原型:static void copy_fd_bitmaps(struct fdtable *nfdt, struct fdtable *ofdt, unsigned int count)

返回类型:void

参数:

类型参数名称
struct fdtable *nfdt
struct fdtable *ofdt
unsigned intcount
54  cpy等于countBITS_PER_BYTE
55  set等于max_fdscount的差除BITS_PER_BYTE
56  memcpy(open_fds, open_fds, cpy)
57  memset((char * )open_fds + cpy, 0, set)
58  memcpy(close_on_exec, close_on_exec, cpy)
59  memset((char * )close_on_exec + cpy, 0, set)
61  cpy等于BITBIT_SIZE(count)
62  set等于BITBIT_SIZE(max_fds)减cpy
63  memcpy(full_fds_bits, full_fds_bits, cpy)
64  memset((char * )full_fds_bits + cpy, 0, set)
调用者
名称描述
copy_fdtableCopy all file descriptors from the old table to the new, expanded table and* clear the extra space. Called with the files spinlock held for write.
dup_fdAllocate a new files structure and copy contents from the* passed in files structure.* errorp will be valid only when the returned files_struct is NULL.