Browse Source

Plan 9 from Bell Labs 2011-09-28

David du Colombier 12 years ago
parent
commit
59102e3672
5 changed files with 14 additions and 1 deletions
  1. 3 0
      sys/src/9/bitsy/dat.h
  2. 3 0
      sys/src/9/kw/dat.h
  3. 3 0
      sys/src/9/mtx/dat.h
  4. 3 0
      sys/src/9/omap/dat.h
  5. 2 1
      sys/src/9/port/sysproc.c

+ 3 - 0
sys/src/9/bitsy/dat.h

@@ -57,6 +57,9 @@ enum
 	FPinit,
 	FPactive,
 	FPinactive,
+
+	/* bit or'd with the state */
+	FPillegal= 0x100,
 };
 struct	FPsave
 {

+ 3 - 0
sys/src/9/kw/dat.h

@@ -65,6 +65,9 @@ enum
 	FPinit,
 	FPactive,
 	FPinactive,
+
+	/* bit or'd with the state */
+	FPillegal= 0x100,
 };
 
 struct Confmem

+ 3 - 0
sys/src/9/mtx/dat.h

@@ -53,6 +53,9 @@ enum
 	FPinit,
 	FPactive,
 	FPinactive,
+
+	/* bit or'd with the state */
+	FPillegal= 0x100,
 };
 
 /*

+ 3 - 0
sys/src/9/omap/dat.h

@@ -89,6 +89,9 @@ enum
 	FPinit,
 	FPactive,
 	FPinactive,
+
+	/* bit or'd with the state */
+	FPillegal= 0x100,
 };
 
 struct Confmem

+ 2 - 1
sys/src/9/port/sysproc.c

@@ -180,7 +180,8 @@ sysrfork(ulong *arg)
 	if((flag&RFNOTEG) == 0)
 		p->noteid = up->noteid;
 
-	p->fpstate = up->fpstate;
+	/* don't penalize the child, it hasn't done FP in a note handler. */
+	p->fpstate = up->fpstate & ~FPillegal;
 	pid = p->pid;
 	memset(p->time, 0, sizeof(p->time));
 	p->time[TReal] = MACHP(0)->ticks;