函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-27 09:57:46
Last Modify:2020-03-17 11:04:53 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:复制信号

函数原型:static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)

返回类型:int

参数:

类型参数名称
unsigned longclone_flags
struct task_struct *tsk
1555  如果clone_flags按位与属于同一个线程组则返回:0
1558  sig等于Shortcuts
1559  信号等于sig
1560  如果非sig则返回:负ENOMEM
1563  nr_threads等于1
1564  atomic_set( & live, 1)
1565  _set - set a refcount's value*@r: the refcount*@n: value to which the refcount will be set
1568  thread_head = (struct list_head)
1569  线程节点 = (struct list_head)
1571  init_waitqueue_head( & r wait4() )
1572  current thread group signal load-balancing target: 等于tsk
1573  初始化信号发送
1574  INIT_HLIST_HEAD( & For collecting multiprocess signals during fork )
1575  seqlock_init( & Cumulative resource counters for dead threads in the group,* and for reaped dead child processes forked by this group.* Live threads maintain their own counters and add to these* in __exit_signal, except for the group leader.)
1576  prev_cputime_init( & prev_cputime)
1584  Protects ->fs, ->files, ->mm, ->group_info, ->comm, keyring* subscriptions and synchronises with wait4(). Also used in procfs. Also* pins the final release of task.io_context. Also protects ->cpuset and* ->cgroup.subsys[]. And ->vfork_done.
1585  内存复制(We don't bother to synchronize most readers of this at all,* because there is no reader checking a limit that actually needs* to get both rlim_cur and rlim_max atomically, and either one* alone is a single word that can safely be read normally, rlim, sizeofWe don't bother to synchronize most readers of this at all,* because there is no reader checking a limit that actually needs* to get both rlim_cur and rlim_max atomically, and either one* alone is a single word that can safely be read normally)
1586  task_unlock(group_leader)
1588  Initialize POSIX timer handling for a thread group.
1590  tty_audit_fork(sig)
1591  sched_autogroup_fork(sig)
1593  OOM kill score adjustment 等于oom_score_adj
1594  OOM kill score adjustment min value.* Only settable by CAP_SYS_RESOURCE. 等于oom_score_adj_min
1596  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & guard against foreign influences on* credential calculations* (notably. ptrace) )
1598  返回:0
调用者
名称描述
copy_process创建进程