A
Agras
I have a shared variable between threads:
volatile int a;
Inside threads, `a` will be increased (a++) and decreased (a--) many
times without mutexes.
I believe this is correct, because a++ and a-- needs only one assembly
instruction.
Am I right, or mutexes are needed?
Thanks
volatile int a;
Inside threads, `a` will be increased (a++) and decreased (a--) many
times without mutexes.
I believe this is correct, because a++ and a-- needs only one assembly
instruction.
Am I right, or mutexes are needed?
Thanks