Ignore:
Timestamp:
Jan 3, 2011, 3:49:48 PM (8 years ago)
Author:
wws
Message:

Merge r14541 from trunk (limit reader-signal/writer-signal values for futexes in rwlocks)

File:
1 edited

Legend:

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

    r13279 r14546  
    883883               ;; That wasn't so bad, was it ?  We have the spinlock now.
    884884               (setf (%get-signed-natural ptr target::rwlock.state) 1)
     885               (setf (%get-signed-long write-signal) -1)
    885886               (%unlock-futex ptr)
    886887               (%set-object ptr target::rwlock.writer tcr)
     
    889890               t)
    890891           (incf (%get-natural ptr target::rwlock.blocked-writers))
    891            (let* ((waitval (%get-natural write-signal 0)))
     892           (let* ((waitval -1))
    892893             (%unlock-futex ptr)
    893894             (with-process-whostate ((rwlock-write-whostate lock))
     
    957958               (setf (%get-signed-natural ptr target::rwlock.state)
    958959                     (the fixnum (1- state)))
     960               (setf (%get-signed-long reader-signal) -1) ; can happen multiple times, but that's harmless
    959961               (%unlock-futex ptr)
    960962               (if flag
     
    963965           (declare (fixnum state))
    964966           (incf (%get-natural ptr target::rwlock.blocked-readers))
    965            (let* ((waitval (%get-natural reader-signal 0)))
     967           (let* ((waitval -1))
    966968             (%unlock-futex ptr)
    967969             (let* ((*interrupt-level* level))
     
    10601062             (if (> nreaders 0)
    10611063               (setq signal reader-signal wakeup #$INT_MAX)))))
    1062        (when signal (incf (%get-signed-natural signal 0)))
     1064       (when signal (setf (%get-signed-long signal) 0))
    10631065       (%unlock-futex ptr)
    10641066       (when signal (futex-wake signal wakeup))
Note: See TracChangeset for help on using the changeset viewer.