Changeset 7343


Ignore:
Timestamp:
Oct 3, 2007, 7:26:22 PM (12 years ago)
Author:
gb
Message:

%VALID-REMAINING-TIMESPEC-TIME-P was a buggy workaround for a post-10.4
bug that's since been fixed; if we can assume that #_nanosleep works,
trust the remaining time it returns when interrupted.

Location:
trunk/ccl
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-0/PPC/ppc-misc.lisp

    r6179 r7343  
    10111011  (blr))
    10121012
    1013 ;;; Work around buggy #_nanosleep implementations.
    1014 (defppclapfunction %valid-remaining-timespec-time-p ((seconds arg_y) (ptr arg_z))
    1015   (unbox-fixnum imm4 seconds)
    1016   (lis imm1 (ash 1000000000 -16))
    1017   (macptr-ptr imm0 ptr)
    1018   (ori imm1 imm1 (logand #xffff 1000000000))
    1019   (li arg_z nil)
    1020   (ldr imm3 0 imm0)
    1021   (cmplr cr2 imm0 imm4)
    1022   (cmpr cr1 imm3 rzero)
    1023   (ldr imm2 target::node-size imm0)
    1024   (cmplr imm2 imm1)
    1025   (bgt cr4 @done)
    1026   (blt cr1 @done)
    1027   (bge @done)
    1028   (or. imm3 imm3 imm2)
    1029   (beq @done)
    1030   (li arg_z t)
    1031   @done
    1032   (blr))
     1013
    10331014
    10341015;;; r13 contains thread context on Linux/Darwin PPC64.
  • trunk/ccl/level-0/X86/x86-misc.lisp

    r7312 r7343  
    749749;;; Leopard test releases.  It's probably not necessary any more; is
    750750;;; it still called ?
    751 (defx86lapfunction %valid-remaining-timespec-time-p ((seconds arg_y) (ptr arg_z))
    752   (macptr-ptr arg_z imm0)
    753   (unbox-fixnum seconds imm1)
    754   (movl ($ x8664::nil-value) (% arg_z.l))
    755   (cmpq ($ 0) (@ (% imm0)))
    756   (jl @done)
    757   (cmpq (% imm1) (% imm0))
    758   (ja @done)
    759   (cmpq ($ 1000000000) (@ 8 (% imm0)))
    760   (jae @done)
    761   (movq (@ (% imm0)) (% imm1))
    762   (orq (@ 8 (% imm0)) (% imm1))
    763   (jz @done)
    764   (movl ($ x8664::t-value) (% arg_z.l))
    765   @done
    766   (single-value-return))
     751
    767752
    768753;;; end of x86-misc.lisp
  • trunk/ccl/level-1/l1-lisp-threads.lisp

    r6491 r7343  
    5151          (declare (type (signed-byte 32) result))
    5252          (if (and (< result 0)
    53                    (eql (%get-errno) (- #$EINTR))
    54                    (%valid-remaining-timespec-time-p seconds bptr))
     53                   (eql (%get-errno) (- #$EINTR)))
    5554            (psetq aptr bptr bptr aptr)
    5655            (return)))))))
Note: See TracChangeset for help on using the changeset viewer.