[CRIU] ARMv5 implementation counter value
Cyrill Gorcunov
gorcunov at gmail.com
Thu Apr 4 15:44:50 MSK 2019
On Thu, Apr 04, 2019 at 12:37:04PM +0000, Maikel Coenen wrote:
> Hi,
>
> I am almost done with implementing ARMv5 implementation of CRIU but currently
> stuck at researching the input arguments of the function atomic_add_return and
> atomic_sub_return.
>
> These functions make use of the atomic_t struct with a counter in it but I want
> to know what possible values this counter can be, so I can make some kind
> of mutex for it.
>
> Can someone help me with this question?
Not sure I understand your question. Counters are integer values as far as I
remember, the only trick is to use lock prefix on instructions generated so
they won't be modified simultaneously on smp machines. Probably you should
look into linux kernel arch/ directory, usually atomic helpers are sitting
there.
More information about the CRIU
mailing list