process.c (71e0e556db08cc20de76d510be5600f6e5ce143c) process.c (3c37026d43c47bec4710cbda286f4a17f416f5e6)
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others.
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2004 Thiemo Seufer

--- 75 unchanged lines hidden (view full) ---

84}
85
86int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
87 unsigned long unused, struct task_struct *p, struct pt_regs *regs)
88{
89 struct thread_info *ti = p->thread_info;
90 struct pt_regs *childregs;
91 long childksp;
1/*
2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
4 * for more details.
5 *
6 * Copyright (C) 1994 - 1999, 2000 by Ralf Baechle and others.
7 * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
8 * Copyright (C) 2004 Thiemo Seufer

--- 75 unchanged lines hidden (view full) ---

84}
85
86int copy_thread(int nr, unsigned long clone_flags, unsigned long usp,
87 unsigned long unused, struct task_struct *p, struct pt_regs *regs)
88{
89 struct thread_info *ti = p->thread_info;
90 struct pt_regs *childregs;
91 long childksp;
92 p->set_child_tid = p->clear_child_tid = NULL;
92
93 childksp = (unsigned long)ti + THREAD_SIZE - 32;
94
95 preempt_disable();
96
97 if (is_fpu_owner()) {
98 save_fp(p);
99 }

--- 29 unchanged lines hidden (view full) ---

129 /*
130 * New tasks lose permission to use the fpu. This accelerates context
131 * switching for most programs since they don't use the fpu.
132 */
133 p->thread.cp0_status = read_c0_status() & ~(ST0_CU2|ST0_CU1);
134 childregs->cp0_status &= ~(ST0_CU2|ST0_CU1);
135 clear_tsk_thread_flag(p, TIF_USEDFPU);
136
93
94 childksp = (unsigned long)ti + THREAD_SIZE - 32;
95
96 preempt_disable();
97
98 if (is_fpu_owner()) {
99 save_fp(p);
100 }

--- 29 unchanged lines hidden (view full) ---

130 /*
131 * New tasks lose permission to use the fpu. This accelerates context
132 * switching for most programs since they don't use the fpu.
133 */
134 p->thread.cp0_status = read_c0_status() & ~(ST0_CU2|ST0_CU1);
135 childregs->cp0_status &= ~(ST0_CU2|ST0_CU1);
136 clear_tsk_thread_flag(p, TIF_USEDFPU);
137
138 if (clone_flags & CLONE_SETTLS)
139 ti->tp_value = regs->regs[7];
140
137 return 0;
138}
139
140/* Fill in the fpu structure for a core dump.. */
141int dump_fpu(struct pt_regs *regs, elf_fpregset_t *r)
142{
143 memcpy(r, &current->thread.fpu, sizeof(current->thread.fpu));
144

--- 239 unchanged lines hidden ---
141 return 0;
142}
143
144/* Fill in the fpu structure for a core dump.. */
145int dump_fpu(struct pt_regs *regs, elf_fpregset_t *r)
146{
147 memcpy(r, &current->thread.fpu, sizeof(current->thread.fpu));
148

--- 239 unchanged lines hidden ---