[CRIU] ARMv5 implementation counter value

Maikel Coenen maikel.coenen at nedap.com
Thu Apr 4 15:53:53 MSK 2019


On 04/04/2019, 14:44, "Cyrill Gorcunov" <gorcunov at gmail.com> wrote:

 >   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.

True, but ARMv5 does not implement any lock prefix or exclusive load/store so you have to implement that yourself.
The counter integer, does it have any range of numbers it usually takes? Or for what purpose are these functions implemented?
    




More information about the CRIU mailing list