I need to perform part of some code atomically. I tried to search for information and I didn't get a specific answer.
lets say the code is:
//ATOMIC
unlock A
lock B
//ATOMIC END
- Is it possible to make this operation atomic in c ?
- Does it depends on my processor?
- Is there any simple function who does that?
- (These instructions are on the user side)
Thanks