patch-2.1.124 linux/include/asm-i386/processor.h
Next file: linux/include/asm-i386/system.h
Previous file: linux/include/asm-i386/mtrr.h
Back to the patch index
Back to the overall index
- Lines: 28
- Date:
Thu Oct 1 18:59:17 1998
- Orig file:
v2.1.123/linux/include/asm-i386/processor.h
- Orig date:
Sat Sep 5 16:46:41 1998
diff -u --recursive --new-file v2.1.123/linux/include/asm-i386/processor.h linux/include/asm-i386/processor.h
@@ -281,6 +281,27 @@
extern void release_segments(struct mm_struct * mm);
/*
+ * FPU lazy state save handling..
+ */
+#define save_fpu(tsk) do { \
+ asm volatile("fnsave %0\n\tfwait":"=m" (tsk->tss.i387)); \
+ tsk->flags &= ~PF_USEDFPU; \
+ stts(); \
+} while (0)
+
+#define unlazy_fpu(tsk) do { \
+ if (tsk->flags & PF_USEDFPU) \
+ save_fpu(tsk); \
+} while (0)
+
+#define clear_fpu(tsk) do { \
+ if (tsk->flags & PF_USEDFPU) { \
+ tsk->flags &= ~PF_USEDFPU; \
+ stts(); \
+ } \
+} while (0)
+
+/*
* Return saved PC of a blocked thread.
*/
extern inline unsigned long thread_saved_pc(struct thread_struct *t)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov