linux kernel function do_fork
来源:互联网 发布:计算机能处理的数据 编辑:程序博客网 时间:2024/05/16 19:05
kernel function do_forkkernel thread:/* * Create a kernel thread. */pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags){ return do_fork(flags|CLONE_VM|CLONE_UNTRACED, (unsigned long)fn, (unsigned long)arg, NULL, NULL);}user space process:1. forkSYSCALL_DEFINE0(fork){#ifdef CONFIG_MMU return do_fork(SIGCHLD, 0, 0, NULL, NULL);2. vforkSYSCALL_DEFINE0(vfork){ return do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, 0, 0, NULL, NULL);}3. cloneSYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp, int __user *, parent_tidptr, int, tls_val, int __user *, child_tidptr)#elif defined(CONFIG_CLONE_BACKWARDS2)SYSCALL_DEFINE5(clone, unsigned long, newsp, unsigned long, clone_flags, int __user *, parent_tidptr, int __user *, child_tidptr, int, tls_val)#elif defined(CONFIG_CLONE_BACKWARDS3)SYSCALL_DEFINE6(clone, unsigned long, clone_flags, unsigned long, newsp, int, stack_size, int __user *, parent_tidptr, int __user *, child_tidptr, int, tls_val)#elseSYSCALL_DEFINE5(clone, unsigned long, clone_flags, unsigned long, newsp, int __user *, parent_tidptr, int __user *, child_tidptr, int, tls_val)#endif{ return do_fork(clone_flags, newsp, 0, parent_tidptr, child_tidptr);}
无论kernel thread还是user space process,在kernel中的表示都是一样的。
0 0
- linux kernel function do_fork
- linux do_fork()源代码分析
- Linux内核-进程-do_fork()
- Linux源码-do_fork()
- 窥探 kernel,just for fun --- do_fork
- do_fork
- do_fork
- 深入理解Linux之do_fork()
- linux内核源码do_fork分析
- Linux笔记记录2 do_fork
- Kernel Function
- 《深入理解Linux内核》do_fork函数
- Linux内核 do_fork 函数源代码浅析
- linux内核之进程创建do_fork
- linux内核 do_fork 函数源代码浅析
- Linux进程创建二——do_fork
- Android筆記-Linux Kernel Ftrace (Function Trace)解析
- Android笔记-Linux Kernel Ftrace (Function Trace)解析
- Android中一些常用类的常用方法(Math、Random、Color、Paint、Canvas、Bitmap、BitmapFactory)
- Android官方技术文档翻译——ApplicationId 与 PackageName
- listener跟filter
- myeclipse中创建maven工程(SpringMVC)示例
- 如何打造一个让人愉快的框架
- linux kernel function do_fork
- Objective-C Runtime分析(三)-objc_msgSend
- iOS开发- 自定义遮罩视图(引导, 功能说明)源码+解析
- 属性和字段的区别
- mariadb 5.5.36 linux下CentOS 6.5 64位安装【给力详细教程】
- iOS日期相关
- git 创建分支单独开发一个新功能,然后合并到dev上的三种方式
- toolbar自定义右边的菜单注意
- ubuntu更新源