Changeset 7610


Ignore:
Timestamp:
Nov 8, 2007, 6:52:14 AM (12 years ago)
Author:
gb
Message:

Try (again) to work around a bug having to do with nanosleep returning
EINTR and also exceeding the original sleep time. (AFAICT, this was
fixed a long time ago in Leopard betas, a workaround that seemed to
negatively affect Linux was removed a few weeks ago, and the bug is
back in in the final version of Leopard, at least on x86-64.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-1/l1-lisp-threads.lisp

    r7343 r7610  
    5252          (if (and (< result 0)
    5353                   (eql (%get-errno) (- #$EINTR)))
    54             (psetq aptr bptr bptr aptr)
     54            ;; x86-64 Leopard bug.
     55            (let* ((asec (pref aptr :timespec.tv_sec))
     56                   (bsec (pref bptr :timespec.tv_sec)))
     57              (if (and (>= bsec 0)
     58                       (or (< bsec asec)
     59                           (and (= bsec asec)
     60                                (< (pref bptr :timespec.tv_nsec)
     61                                   (pref aptr :timespec.tv_nsec)))))
     62                (psetq aptr bptr bptr aptr)
     63                (return)))
    5564            (return)))))))
    5665
Note: See TracChangeset for help on using the changeset viewer.