Fix SLEEP on 32-bit platforms.
authorJames M. Lawrence <llmjjmll@gmail.com>
Tue, 25 Jun 2013 21:43:27 +0000 (17:43 -0400)
committerStas Boukarev <stassats@gmail.com>
Fri, 28 Jun 2013 13:59:53 +0000 (15:59 +0200)
src/code/toplevel.lisp
tests/interface.pure.lisp

index d6c5427..ca49fd2 100644 (file)
@@ -168,7 +168,7 @@ means to wait indefinitely.")
   (flet ((split-float ()
            (let ((whole-seconds (truly-the fixnum (%unary-truncate seconds))))
              (values whole-seconds
-                     (truly-the fixnum
+                     (truly-the (integer 0 #.(expt 10 9))
                                 (%unary-truncate (* (- seconds (float whole-seconds))
                                                     (load-time-value 1s9 t))))))))
     (declare (inline split-float))
index 90d58f9..8f5d806 100644 (file)
@@ -67,7 +67,8 @@
       (sleep 2)
       (sleep 2))))
 
-;;; SLEEP should not cons
+;;; SLEEP should not cons except on 32-bit platforms when
+;;; (> (mod seconds 1) (* most-positive-fixnum 1e-9))
 (with-test (:name (sleep :non-consing) :fails-on :win32)
   (ctu:assert-no-consing (sleep 0.00001s0))
   (locally (declare (notinline sleep))