asm volatile( "fnsave %0 ; fwait"
: "=m" (tsk->thread.i387.fsave) );
}
- clear_thread_flag(TIF_USEDFPU);
+ clear_tsk_thread_flag(tsk, TIF_USEDFPU);
}
void save_init_fpu( struct task_struct *tsk )
void kernel_fpu_begin(void)
{
- struct task_struct *tsk = current;
-
if (test_thread_flag(TIF_USEDFPU)) {
- __save_init_fpu(tsk);
+ __save_init_fpu(current);
return;
}
clts();
if ((unsigned long) data > _NSIG)
break;
if (request == PTRACE_SYSCALL) {
- set_thread_flag(TIF_SYSCALL_TRACE);
+ set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
}
else {
- clear_thread_flag(TIF_SYSCALL_TRACE);
+ clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
}
child->exit_code = data;
/* make sure the single step bit is not set. */
ret = -EIO;
if ((unsigned long) data > _NSIG)
break;
- clear_thread_flag(TIF_SYSCALL_TRACE);
+ clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
if ((child->ptrace & PT_DTRACE) == 0) {
/* Spurious delayed TF traps may occur */
child->ptrace |= PT_DTRACE;
{
if (!test_thread_flag(TIF_SYSCALL_TRACE))
return;
- if (current->ptrace & PT_PTRACED)
+ if (!(current->ptrace & PT_PTRACED))
return;
/* the 0x80 provides a way for the tracing parent to distinguish
between a syscall stop and SIGTRAP delivery */
#define unlazy_fpu( tsk ) do { \
- if (test_thread_flag(TIF_USEDFPU)) \
+ if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) \
save_init_fpu( tsk ); \
} while (0)
-#define clear_fpu( tsk ) \
-do { \
- if (test_thread_flag(TIF_USEDFPU)) { \
- asm volatile("fwait"); \
- clear_thread_flag(TIF_USEDFPU); \
- stts(); \
- } \
+#define clear_fpu( tsk ) \
+do { \
+ if (test_tsk_thread_flag(tsk, TIF_USEDFPU)) { \
+ asm volatile("fwait"); \
+ clear_tsk_thread_flag(tsk, TIF_USEDFPU); \
+ stts(); \
+ } \
} while (0)
/*
#define THREAD_SIZE (2*PAGE_SIZE)
#define alloc_thread_info() ((struct thread_info *) __get_free_pages(GFP_KERNEL,1))
#define free_thread_info(ti) free_pages((unsigned long) (ti), 1)
-#define get_thread_info(ti) get_task_struct((ti)->l_task)
-#define put_thread_info(ti) put_task_struct((ti)->l_task)
+#define get_thread_info(ti) get_task_struct((ti)->task)
+#define put_thread_info(ti) put_task_struct((ti)->task)
#else /* !__ASSEMBLY__ */