process_64.c (f594d0b9b34aeb8e3ffa524eaa8a4085afb56d22) | process_64.c (0100301bfdf56a2a370c7157b5ab0fbf9313e1cd) |
---|---|
1/* 2 * Copyright (C) 1995 Linus Torvalds 3 * 4 * Pentium III FXSR, SSE support 5 * Gareth Hughes <gareth@valinux.com>, May 2000 6 * 7 * X86-64 port 8 * Andi Kleen. --- 127 unchanged lines hidden (view full) --- 136 } 137} 138 139int copy_thread_tls(unsigned long clone_flags, unsigned long sp, 140 unsigned long arg, struct task_struct *p, unsigned long tls) 141{ 142 int err; 143 struct pt_regs *childregs; | 1/* 2 * Copyright (C) 1995 Linus Torvalds 3 * 4 * Pentium III FXSR, SSE support 5 * Gareth Hughes <gareth@valinux.com>, May 2000 6 * 7 * X86-64 port 8 * Andi Kleen. --- 127 unchanged lines hidden (view full) --- 136 } 137} 138 139int copy_thread_tls(unsigned long clone_flags, unsigned long sp, 140 unsigned long arg, struct task_struct *p, unsigned long tls) 141{ 142 int err; 143 struct pt_regs *childregs; |
144 struct fork_frame *fork_frame; 145 struct inactive_task_frame *frame; |
|
144 struct task_struct *me = current; 145 146 p->thread.sp0 = (unsigned long)task_stack_page(p) + THREAD_SIZE; 147 childregs = task_pt_regs(p); | 146 struct task_struct *me = current; 147 148 p->thread.sp0 = (unsigned long)task_stack_page(p) + THREAD_SIZE; 149 childregs = task_pt_regs(p); |
148 p->thread.sp = (unsigned long) childregs; 149 set_tsk_thread_flag(p, TIF_FORK); | 150 fork_frame = container_of(childregs, struct fork_frame, regs); 151 frame = &fork_frame->frame; 152 frame->bp = 0; 153 frame->ret_addr = (unsigned long) ret_from_fork; 154 p->thread.sp = (unsigned long) fork_frame; |
150 p->thread.io_bitmap_ptr = NULL; 151 152 savesegment(gs, p->thread.gsindex); 153 p->thread.gsbase = p->thread.gsindex ? 0 : me->thread.gsbase; 154 savesegment(fs, p->thread.fsindex); 155 p->thread.fsbase = p->thread.fsindex ? 0 : me->thread.fsbase; 156 savesegment(es, p->thread.es); 157 savesegment(ds, p->thread.ds); --- 439 unchanged lines hidden --- | 155 p->thread.io_bitmap_ptr = NULL; 156 157 savesegment(gs, p->thread.gsindex); 158 p->thread.gsbase = p->thread.gsindex ? 0 : me->thread.gsbase; 159 savesegment(fs, p->thread.fsindex); 160 p->thread.fsbase = p->thread.fsindex ? 0 : me->thread.fsbase; 161 savesegment(es, p->thread.es); 162 savesegment(ds, p->thread.ds); --- 439 unchanged lines hidden --- |