It's almost there:
(let* ((addr (cffi:foreign-alloc :int32 :initial-element 1234)) (starting-value (cffi:mem-ref addr :int32))) (print starting-value) (sb-int::%primitive sb-vm::signed-sap-cas-32 (cffi:mem-aptr addr :int32) 0 starting-value (random 32)) (print (cffi:mem-ref addr :int32)))
It's almost there:
(let* ((addr (cffi:foreign-alloc :int32 :initial-element 1234))
(starting- value (cffi:mem-ref addr :int32)))
(sb- int::%primitive sb-vm:: signed- sap-cas- 32 (cffi:mem-aptr addr :int32) 0
starting- value (random 32))
(print starting-value)
(print (cffi:mem-ref addr :int32)))