unsigned long stack_top, struct task_struct * p,
struct pt_regs *regs)
{
- int ret;
-
p->thread = (struct thread_struct) INIT_THREAD;
- ret = CHOOSE_MODE_PROC(copy_thread_tt, copy_thread_skas, nr,
- clone_flags, sp, stack_top, p, regs);
-
- if (ret || !current->thread.forking)
- goto out;
-
- clear_flushed_tls(p);
-
- /*
- * Set a new TLS for the child thread?
- */
- if (clone_flags & CLONE_SETTLS)
- ret = arch_copy_tls(p);
-
-out:
- return ret;
+ return(CHOOSE_MODE_PROC(copy_thread_tt, copy_thread_skas, nr,
+ clone_flags, sp, stack_top, p, regs));
}
void initial_thread_cb(void (*proc)(void *), void *arg)
{
CHOOSE_MODE(uml_idle_timer(), (void) 0);
+ atomic_inc(&init_mm.mm_count);
+ current->mm = &init_mm;
+ current->active_mm = &init_mm;
+
while(1){
/* endless idle loop with no priority at all */
return strlen(buf);
}
-static int proc_write_sysemu(struct file *file,const char __user *buf, unsigned long count,void *data)
+static int proc_write_sysemu(struct file *file,const char *buf, unsigned long count,void *data)
{
char tmp[2];