diff --git a/src/kernel/libroot/os/arch/ppc/atomic.S b/src/kernel/libroot/os/arch/ppc/atomic.S index c054b20f6b..470deb91b2 100644 --- a/src/kernel/libroot/os/arch/ppc/atomic.S +++ b/src/kernel/libroot/os/arch/ppc/atomic.S @@ -61,3 +61,12 @@ lost5: lwarx %r6, 0, %r3 out5: mr %r3, %r6 blr +/* int atomic_read(int *value) + * r3 + */ +FUNCTION(atomic_read): +lost6: lwarx %r5, 0, %r3 + stwcx. %r5, 0, %r3 + bne- lost6 + mr %r3, %r5 + blr