Index: /branches/ia32/level-0/X86/X8632/x8632-utils.lisp
===================================================================
--- /branches/ia32/level-0/X86/X8632/x8632-utils.lisp	(revision 9473)
+++ /branches/ia32/level-0/X86/X8632/x8632-utils.lisp	(revision 9474)
@@ -318,5 +318,11 @@
 the sense that calls to it are serialized), it doesn't make a whole lot
 of sense to be turning the EGC on and off from multiple threads ..."
-  (int ($ 3))
+  (check-nargs 1)
+  (clrl imm0)
+  (cmp-reg-to-nil arg)
+  (setne (% imm0.b))
+  (movd (% imm0) (% mm0))
+  (movl ($ arch::gc-trap-function-egc-control) (% imm0))
+  (uuo-gc-trap)
   (single-value-return))
 
@@ -345,4 +351,26 @@
   (single-value-return))
 
+(defx8632lapfunction lisp-heap-gc-threshold ()
+  "Return the value of the kernel variable that specifies the amount
+of free space to leave in the heap after full GC."
+  (check-nargs 0)
+  (movl ($ arch::gc-trap-function-get-lisp-heap-threshold) (% imm0))
+  (uuo-gc-trap)
+  (jmp-subprim .SPmakeu32))
+
+(defx8632lapfunction set-lisp-heap-gc-threshold ((new arg_z))
+  "Set the value of the kernel variable that specifies the amount of free
+space to leave in the heap after full GC to new-value, which should be a
+non-negative fixnum. Returns the value of that kernel variable (which may
+be somewhat larger than what was specified)."
+  (check-nargs 1)
+  (save-simple-frame)
+  (call-subprim .SPgetu32)
+  (movd (% imm0) (% mm0))
+  (movl ($ arch::gc-trap-function-set-lisp-heap-threshold) (% imm0))
+  (uuo-gc-trap)
+  (restore-simple-frame)
+  (jmp-subprim .SPmakeu32))
+
 (defx8632lapfunction use-lisp-heap-gc-threshold ()
   "Try to grow or shrink lisp's heap space, so that the free space is (approximately) equal to the current heap threshold. Return NIL"
