函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ksys_dup3

函数原型:static int ksys_dup3(unsigned int oldfd, unsigned int newfd, int flags)

返回类型:int

参数:

类型参数名称
unsigned intoldfd
unsigned intnewfd
intflags
911  err等于负EBADF
913  files等于files
915  如果flags按位与O_CLOEXEC的反的值不等于0则返回:负EINVAL
918  如果此条件成立可能性小(为编译器优化)(oldfd == newfd)则返回:负EINVAL
921  如果newfd大于等于rlimit(RLIMIT_NOFILE)则返回:负EBADF
924  加自旋锁
925  err等于Expand files.* This function will expand the file structures, if the requested size exceeds* the current capacity and there is room for expansion.* Return <0 error code on error; 0 when nothing done; 1 when files were
926  file等于Check whether the specified fd has an open file.(oldfd)
927  如果此条件成立可能性小(为编译器优化)(!file)则转到:Ebadf
929  如果此条件成立可能性小(为编译器优化)(err < 0)则
930  如果err恒等于负EMFILE则转到:Ebadf
932  转到:out_unlock
934  返回:do_dup2(files, file, newfd, flags)
936  Ebadf :
937  err等于负EBADF
938  out_unlock :
939  自旋锁解锁
940  返回:err
调用者
名称描述
SYSCALL_DEFINE3
SYSCALL_DEFINE2