summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e44ce12)
We can't hold the GPS mutex while waiting for the GPS receiver to load
data as it protects the GPS data with the GPS mutex.
Signed-off-by: Keith Packard <keithp@keithp.com>
- ao_mutex_get(&ao_gps_mutex);
while ((new = ao_gps_new) == 0)
ao_sleep(&ao_gps_new);
while ((new = ao_gps_new) == 0)
ao_sleep(&ao_gps_new);
+ ao_mutex_get(&ao_gps_mutex);
if (new & AO_GPS_NEW_DATA)
ao_xmemcpy(&gps_data, &ao_gps_data, sizeof (ao_gps_data));
if (new & AO_GPS_NEW_TRACKING)
if (new & AO_GPS_NEW_DATA)
ao_xmemcpy(&gps_data, &ao_gps_data, sizeof (ao_gps_data));
if (new & AO_GPS_NEW_TRACKING)