Changeset 7581


Ignore:
Timestamp:
Nov 1, 2007, 7:17:23 PM (12 years ago)
Author:
gb
Message:

New (x86-64) version of %GET-SPING-LOCK; uses PAUSE instruction in the loop.

Location:
branches/working-0710/ccl/level-0
Files:
2 edited

Legend:

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

    r7543 r7581  
    731731  (single-value-return))
    732732
     733(defx86lapfunction %get-spin-lock ((p arg_z))
     734  (check-nargs 1)
     735  (save-simple-frame)
     736  @again
     737  (macptr-ptr arg_z imm1)
     738  (movq (@ '*spin-lock-tries* (% fn)) (% temp0))
     739  (movq (@ target::symbol.vcell (% temp0)) (% temp0))
     740  (movq (@ (% :rcontext) x8664::tcr.linear) (% arg_y))
     741  @try-swap
     742  (xorq (% rax) (% rax))
     743  (lock)
     744  (cmpxchgq (% arg_y) (@ (% imm1)))
     745  (je @done)
     746  (pause)
     747  (subq ($ '1) (% temp0))
     748  (jne @try-swap)
     749  (pushq (% arg_z))
     750  (call-symbol yield 0)
     751  (popq (% arg_z))
     752  (jmp @again)
     753  @done
     754  (restore-simple-frame)
     755  (single-value-return))
     756 
     757
    733758;;; end of x86-misc.lisp
  • branches/working-0710/ccl/level-0/l0-misc.lisp

    r7553 r7581  
    498498(defparameter *spin-lock-timeouts* 0)
    499499
    500 #-futex
     500#+(and (not futex) (not x86-target))
    501501(defun %get-spin-lock (p)
    502502  (let* ((self (%current-tcr))
Note: See TracChangeset for help on using the changeset viewer.