[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Atomic instructions



> Is it possible to emulate the i386 cmpxchg instruction on HPPA? From what I 
> gather from the manuals the only atomic op on HPPA is ldcw which I have yet 
> to figure out a way to bend to my will. Any ideas?
> 
> NB: cmpxchg compares two numbers, and if they are the same overwrites one of 
> the numbers with a third number atomically.

ldcw is really the only atomic operation on pa. In the kernel cmpxchg is
implemented as a multi-instruction operation done inside a lock (that's
done using ldcw)

is using an external lock an option?

randolph



Reply to: