[server][ArmBase] Replace g_atomic functions with AtomicValue.