Changeset 14540


Ignore:
Timestamp:
Dec 31, 2010, 10:24:56 PM (8 years ago)
Author:
wws
Message:

Change futex values from natural to long in rwlock code. This prevents type errors on 64-bit machines with lots of lock contention.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-misc.lisp

    r14119 r14540  
    896896               t)
    897897           (incf (%get-natural ptr target::rwlock.blocked-writers))
    898            (let* ((waitval (%get-natural write-signal 0)))
     898           (let* ((waitval (%get-signed-long write-signal 0)))
    899899             (%unlock-futex ptr)
    900900             (with-process-whostate ((rwlock-write-whostate lock))
     
    970970           (declare (fixnum state))
    971971           (incf (%get-natural ptr target::rwlock.blocked-readers))
    972            (let* ((waitval (%get-natural reader-signal 0)))
     972           (let* ((waitval (%get-signed-long reader-signal 0)))
    973973             (%unlock-futex ptr)
    974974             (let* ((*interrupt-level* level))
     
    10671067             (if (> nreaders 0)
    10681068               (setq signal reader-signal wakeup #$INT_MAX)))))
    1069        (when signal (incf (%get-signed-natural signal 0)))
     1069       (when signal (incf (%get-signed-long signal 0)))
    10701070       (%unlock-futex ptr)
    10711071       (when signal (futex-wake signal wakeup))
Note: See TracChangeset for help on using the changeset viewer.