Changeset 7312


Ignore:
Timestamp:
Sep 28, 2007, 12:44:15 AM (12 years ago)
Author:
gb
Message:

When unlocking a read-write lock on x86-64, clear the owner field before
incrementing the value field if the value field is currently -1. (The
PPC was already doing so; doing it in the order that x86-64 had been
doing it caused the lock to become free, and zeroing the owner after
the incf could cause the lock to be locked for writing with no owner
set ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/level-0/X86/x86-misc.lisp

    r6568 r7312  
    426426  (cmpq (% imm0) (@ (% :rcontext) x8664::tcr.linear))
    427427  (jne @fail)
     428  (cmpq ($ '-1) (@ x8664::lock._value (% lock)))
     429  (jne @still-owner)
     430  (movsd (% fpzero) (@ x8664::lock.writer (% lock)))
     431  @still-owner
    428432  (addq ($ '1) (@ x8664::lock._value (% lock)))
    429   (jne @home)
    430   (movsd (% fpzero) (@ x8664::lock.writer (% lock)))
    431   @home
    432433  (single-value-return)
    433434  @fail
Note: See TracChangeset for help on using the changeset viewer.