Make variables shared between threads atomic
- Issue:
Some variables that are shared between threads are defined with 'volatile'
keyword for preventing race condition. However 'volatile' can not assure
preventing race condition.
- Solution:
'volatile' just prevents compiler optimization, not prevent race
condition between threads. To assure thread safety, we should use atomic
variable.
This patch fixes the definition of those variable into atomic variables.
Through this patch, each variables will be created as atomic variables
and these atomic varaibles can prevent race condition during multi
threads enviroment.
Change-Id: I71f254a62d7ac848fedeffc91c40e4271f7af25d
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>