Next: , Previous: , Up: Instruction Set   [Contents][Index]


9.3.7.10 Atomic Memory Access Instructions

Instruction: current-thread s24:dst

Write the current thread into dst.

Instruction: atomic-scm-ref/immediate s8:dst s8:obj c8:idx

Atomically load the SCM object at word offset idx from local obj, using the sequential consistency memory model. Store the result to dst.

Instruction: atomic-scm-set!/immediate s8:obj c8:idx s8:val

Atomically set the SCM object at word offset idx from local obj to val, using the sequential consistency memory model.

Instruction: atomic-scm-swap!/immediate s24:dst x8:_ s24:obj c8:idx s24:val

Atomically swap the SCM value stored in object obj at word offset idx with val, using the sequentially consistent memory model. Store the previous value to dst.

Instruction: atomic-scm-compare-and-swap!/immediate s24:dst x8:_ s24:obj c8:idx s24:expected x8:_ s24:desired

Atomically swap the SCM value stored in object obj at word offset idx with desired, if and only if the value that was there was expected, using the sequentially consistent memory model. Store the value that was previously at idx from obj in dst.