FP2-1887: bluetooth: Fix race condition in GKI timer callback

bluetooth: Fix race condition in GKI timer callback

There is a race condition between calls to set_nonwake_alarm
and bt_alarm_cb.  This race condition can cause a2dp audio to
fail completely and potentially require a reboot to restart it.

To exagerate the race condition, you can insert a sleep after

alarm_service.timer_last_expired_us = now_us();

and when set_nonwake_alarm runs during this interval, we end
up generate a very large number of virtual ticks (aka, the
number of ticks is negative but as an UINT32).

Conflicts:
	gki/ulinux/gki_ulinux.c

Change-Id: I26bc32be1a988d548c5b891a575e0c0367acddaf
1 file changed