Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\fork.c Create Date:2022-07-28 08:58:16
Last Modify:2020-03-17 11:04:53 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:copy_signal

Proto:static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)

Type:int

Parameter:

TypeParameterName
unsigned longclone_flags
struct task_struct *tsk
1555  If clone_flags & Same thread group Then Return 0
1558  sig = Shortcuts
1559  Signal handlers: = sig
1560  If Not sig Then Return -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  theead node = (struct list_head)
1571  init_waitqueue_head( & r wait4() )
1572  current thread group signal load-balancing target: = tsk
1573  Initialization signal transmission
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  No 3D Now!(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  Return 0
Caller
NameDescribe
copy_processCreate a new process