Changeset 7399 for branches/working-0710


Ignore:
Timestamp:
Oct 12, 2007, 9:35:06 AM (12 years ago)
Author:
gb
Message:

%check-deferred-gc, nuke old rwlock stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0710/ccl/level-0/X86/x86-misc.lisp

    r7343 r7399  
    393393;;; Return true iff we were able to increment a non-negative
    394394;;; lock._value
    395 (defx86lapfunction %try-read-lock-rwlock ((lock arg_z))
    396   (check-nargs 1)
    397   @try
    398   (movq (@ x8664::lock._value (% lock)) (% rax))
    399   (movq (% rax) (% imm1))
    400   (addq ($ '1) (% imm1))
    401   (jle @fail)
    402   (lock)
    403   (cmpxchgq (% imm1) (@ x8664::lock._value (% lock)))
    404   (jne @try)
    405   (single-value-return)                                 ; return the lock
    406 @fail
    407   (movl ($ x8664::nil-value) (%l arg_z))
    408   (single-value-return))
    409 
    410 
    411 
    412 (defx86lapfunction unlock-rwlock ((lock arg_z))
    413   (cmpq ($ 0) (@ x8664::lock._value (% lock)))
    414   (jle @unlock-write)
    415   @unlock-read
    416   (movq (@ x8664::lock._value (% lock)) (% rax))
    417   (lea (@ '-1 (% imm0)) (% imm1))
    418   (lock)
    419   (cmpxchgq (% imm1) (@ x8664::lock._value (% lock)))
    420   (jne @unlock-read)
    421   (single-value-return)
    422   @unlock-write
    423   ;;; If we aren't the writer, return NIL.
    424   ;;; If we are and the value's about to go to 0, clear the writer field.
    425   (movq (@ x8664::lock.writer (% lock)) (% imm0))
    426   (cmpq (% imm0) (@ (% :rcontext) x8664::tcr.linear))
    427   (jne @fail)
    428   (cmpq ($ '-1) (@ x8664::lock._value (% lock)))
    429   (jne @still-owner)
    430   (movsd (% fpzero) (@ x8664::lock.writer (% lock)))
    431   @still-owner
    432   (addq ($ '1) (@ x8664::lock._value (% lock)))
    433   (single-value-return)
    434   @fail
    435   (movl ($ x8664::nil-value) (%l arg_z))
    436   (single-value-return))
     395
     396
     397
    437398
    438399(defx86lapfunction %atomic-incf-node ((by arg_x) (node arg_y) (disp arg_z))
     
    750711;;; it still called ?
    751712
     713(defx86lapfunction %check-deferred-gc ()
     714  (btq ($ (+ arch::tcr-flag-bit-pending-suspend target::fixnumshift)) (@ (% :rcontext) x8664::tcr.flags))
     715  (movl ($ x8664::nil-value) (% arg_z.l))
     716  (jae @done)
     717  (ud2a)
     718  (:byte 3)
     719  (movl ($ x8664::t-value) (% arg_z.l))
     720  @done
     721  (single-value-return))
    752722
    753723;;; end of x86-misc.lisp
Note: See TracChangeset for help on using the changeset viewer.