From: James M. Lawrence Date: Tue, 25 Jun 2013 21:43:27 +0000 (-0400) Subject: Fix SLEEP on 32-bit platforms. X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=616e16f529572b23dbb4991b49bc7343cf0412bc;p=sbcl.git Fix SLEEP on 32-bit platforms. --- diff --git a/src/code/toplevel.lisp b/src/code/toplevel.lisp index d6c5427..ca49fd2 100644 --- a/src/code/toplevel.lisp +++ b/src/code/toplevel.lisp @@ -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)) diff --git a/tests/interface.pure.lisp b/tests/interface.pure.lisp index 90d58f9..8f5d806 100644 --- a/tests/interface.pure.lisp +++ b/tests/interface.pure.lisp @@ -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))