patch-2.2.0-pre7 linux/arch/alpha/kernel/process.c
Next file: linux/arch/alpha/kernel/proto.h
Previous file: linux/arch/alpha/kernel/machvec.h
Back to the patch index
Back to the overall index
- Lines: 37
- Date:
Sat Jan 9 19:10:39 1999
- Orig file:
v2.2.0-pre6/linux/arch/alpha/kernel/process.c
- Orig date:
Fri Jan 8 22:36:00 1999
diff -u --recursive --new-file v2.2.0-pre6/linux/arch/alpha/kernel/process.c linux/arch/alpha/kernel/process.c
@@ -55,6 +55,7 @@
unsigned long init_user_stack[1024] = { STACK_MAGIC, };
static struct vm_area_struct init_mmap = INIT_MMAP;
static struct fs_struct init_fs = INIT_FS;
+static struct file * init_fd_array[NR_OPEN] = { NULL, };
static struct files_struct init_files = INIT_FILES;
static struct signal_struct init_signals = INIT_SIGNALS;
struct mm_struct init_mm = INIT_MM;
@@ -256,11 +257,26 @@
* with parameters (SIGCHLD, 0).
*/
int alpha_clone(unsigned long clone_flags, unsigned long usp,
- struct switch_stack * swstack)
+ struct switch_stack * swstack)
{
if (!usp)
usp = rdusp();
- return do_fork(clone_flags, usp, (struct pt_regs *) (swstack+1));
+ return do_fork(clone_flags & ~CLONE_VFORK, usp, (struct pt_regs *) (swstack+1));
+}
+
+int alpha_vfork(struct switch_stack * swstack)
+{
+ int child;
+ struct semaphore sem = MUTEX_LOCKED;
+
+ current->vfork_sem = &sem;
+ child = do_fork(CLONE_VFORK | CLONE_VM | SIGCHLD, rdusp(),
+ (struct pt_regs *) (swstack+1));
+
+ if (child > 0)
+ down(&sem);
+
+ return child;
}
extern void ret_from_sys_call(void);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov