Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\file.c Create Date:2022-07-28 20:08:30
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static void copy_fd_bitmaps(struct fdtable *nfdt, struct fdtable *ofdt, unsigned int count)

Type:void

Parameter:

TypeParameterName
struct fdtable *nfdt
struct fdtable *ofdt
unsigned intcount
54  cpy = count / BITS_PER_BYTE
55  set = (max_fds - count) / 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)
Caller
NameDescribe
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.