Function Report

Linux Kernel (v4.4)

Source File:kernel\fork.c Create Date:2016-01-14 10:16:33
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:copy_fs

Function:static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)

Return Type:static int

Parameter:

Type Parameter NameRemarks
unsigned long clone_flags
struct task_struct * tsk

Function description:

996  *fs = current process-> filesystem information
997  If clone_flags & set if fs info shared between processes then
999  spin_lock( &lock)
1000  If in_exec then
1001  spin_unlock( &lock)
1002  Returning -Try again
1004  users++
1005  spin_unlock( &lock)
1006  Returning 0
1008  filesystem information = copy_fs_struct(fs)
1009  If ! filesystem information then Returning -Out of memory
1011  Returning 0
Caller
Function NameFunction description
copy_processCreate a new process