fork.c (cb54b53adae70701bdd77d848cea4b9b39b61cf9) | fork.c (db446a08c23d5475e6b08c87acca79ebb20f283c) |
---|---|
1/* 2 * linux/kernel/fork.c 3 * 4 * Copyright (C) 1991, 1992 Linus Torvalds 5 */ 6 7/* 8 * 'fork.c' contains the help-routines for the 'fork' system call --- 508 unchanged lines hidden (view full) --- 517__setup("coredump_filter=", coredump_filter_setup); 518 519#include <linux/init_task.h> 520 521static void mm_init_aio(struct mm_struct *mm) 522{ 523#ifdef CONFIG_AIO 524 spin_lock_init(&mm->ioctx_lock); | 1/* 2 * linux/kernel/fork.c 3 * 4 * Copyright (C) 1991, 1992 Linus Torvalds 5 */ 6 7/* 8 * 'fork.c' contains the help-routines for the 'fork' system call --- 508 unchanged lines hidden (view full) --- 517__setup("coredump_filter=", coredump_filter_setup); 518 519#include <linux/init_task.h> 520 521static void mm_init_aio(struct mm_struct *mm) 522{ 523#ifdef CONFIG_AIO 524 spin_lock_init(&mm->ioctx_lock); |
525 INIT_HLIST_HEAD(&mm->ioctx_list); | 525 mm->ioctx_table = NULL; |
526#endif 527} 528 529static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p) 530{ 531 atomic_set(&mm->mm_users, 1); 532 atomic_set(&mm->mm_count, 1); 533 init_rwsem(&mm->mmap_sem); --- 1007 unchanged lines hidden (view full) --- 1541 enum pid_type type; 1542 1543 for (type = PIDTYPE_PID; type < PIDTYPE_MAX; ++type) { 1544 INIT_HLIST_NODE(&links[type].node); /* not really needed */ 1545 links[type].pid = &init_struct_pid; 1546 } 1547} 1548 | 526#endif 527} 528 529static struct mm_struct *mm_init(struct mm_struct *mm, struct task_struct *p) 530{ 531 atomic_set(&mm->mm_users, 1); 532 atomic_set(&mm->mm_count, 1); 533 init_rwsem(&mm->mmap_sem); --- 1007 unchanged lines hidden (view full) --- 1541 enum pid_type type; 1542 1543 for (type = PIDTYPE_PID; type < PIDTYPE_MAX; ++type) { 1544 INIT_HLIST_NODE(&links[type].node); /* not really needed */ 1545 links[type].pid = &init_struct_pid; 1546 } 1547} 1548 |
1549struct task_struct *fork_idle(int cpu) | 1549struct task_struct * __cpuinit fork_idle(int cpu) |
1550{ 1551 struct task_struct *task; 1552 task = copy_process(CLONE_VM, 0, 0, NULL, &init_struct_pid, 0); 1553 if (!IS_ERR(task)) { 1554 init_idle_pids(task->pids); 1555 init_idle(task, cpu); 1556 } 1557 --- 384 unchanged lines hidden --- | 1550{ 1551 struct task_struct *task; 1552 task = copy_process(CLONE_VM, 0, 0, NULL, &init_struct_pid, 0); 1553 if (!IS_ERR(task)) { 1554 init_idle_pids(task->pids); 1555 init_idle(task, cpu); 1556 } 1557 --- 384 unchanged lines hidden --- |