objective c - Is copying primitive types atomic on iOS? -


i implement custom getters , setters atomic properties in objective-c on ios. not sure if copying primitives types (like char, short, int, long, long long, float, double, long double) guaranteed atomic on ios platform , arm architecture.

is copying primitive values when assigning variable or returning method atomic operation?

if ios device running on 32-bit arm architecture 64-bit access not atomic.

this makes long long , double access not atomic on 32-bit arm devices.

afaik objective-c not support long double type.

you can compare linux's atomic implementation arm architectures more information , ideas:

https://github.com/torvalds/linux/blob/master/arch/arm/include/asm/atomic.h

https://github.com/torvalds/linux/blob/master/arch/arm64/include/asm/atomic.h


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -