#!+sb-thread
`(locally
(declare (optimize (safety 0) (speed 3)))
- (sb!vm::fast-symbol-global-value-xadd ',symbol-name ,delta)
- ,symbol-name))
+ (sb!vm::locked-symbol-global-value-add ',symbol-name ,delta)))
(defmacro without-gcing (&rest body)
#!+sb-doc
(:policy :fast)
(:translate symbol-value))
-(defknown fast-symbol-global-value-xadd (symbol fixnum) fixnum ())
+(defknown locked-symbol-global-value-add (symbol fixnum) fixnum ())
-(define-vop (fast-symbol-global-value-xadd cell-xadd)
- (:variant symbol-value-slot other-pointer-lowtag)
+(define-vop (locked-symbol-global-value-add)
+ (:args (object :scs (descriptor-reg) :to :result)
+ (value :scs (any-reg) :target result))
+ (:arg-types * tagged-num)
+ (:results (result :scs (any-reg) :from (:argument 1)))
(:policy :fast)
- (:translate fast-symbol-global-value-xadd)
- (:arg-types * tagged-num))
+ (:translate locked-symbol-global-value-add)
+ (:result-types tagged-num)
+ (:policy :fast-safe)
+ (:generator 4
+ (move result value)
+ (inst lock)
+ (inst add (make-ea :dword :base object
+ :disp (- (* symbol-value-slot n-word-bytes)
+ other-pointer-lowtag))
+ value)))
#!+sb-thread
(define-vop (boundp)
(:policy :fast-safe)
(:generator 5
(move eax old-value)
+ (inst lock)
(inst cmpxchg (make-ea :dword :base object :index slot :scale 1
:disp (- (* instance-slots-offset n-word-bytes)
instance-pointer-lowtag))
pid_t pid=0;
while(pid=waitpid(-1,&status,__WALL|WUNTRACED)) {
struct thread *th;
- fprintf(stderr,"waitpid pid %d\n",pid);
if(pid==-1) {
if(errno == EINTR) {
if(maybe_gc_pending) parent_do_garbage_collect();
{
u32 eax=0;
do {
- asm ("xor %0,%0;cmpxchg %1,%2"
+ asm ("xor %0,%0;lock cmpxchg %1,%2"
: "=a" (eax)
: "r" (value), "m" (*word)
: "memory", "cc");
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.pre8.68"
+"0.pre8.69"