~foxtrotgps-team/foxtrotgps/trunk

« back to all changes in this revision

Viewing changes to src/hrm_functions.c

  • Committer: Paul Wise
  • Author(s): Charles Curley
  • Date: 2019-02-26 00:59:58 UTC
  • Revision ID: pabs3@bonedaddy.net-20190226005958-ohuong1xgfd6yd9d
Use current glib thread functions when available

Kept deprecated code for users of old glib by using version checks.

Documentation: https://developer.gnome.org/glib/2.34/glib-Deprecated-Thread-APIs.html
See-also: https://developer.gnome.org/glib/stable/glib-Version-Information.html#GLIB-CHECK-VERSION:CAPS
Fixes: warning: ‘g_static_mutex_get_mutex_impl’ is deprecated: Use 'GMutex' instead [-Wdeprecated-declarations]
Fixes: warning: ‘g_thread_create’ is deprecated: Use 'g_thread_new' instead [-Wdeprecated-declarations]
Fixes: warning: ‘g_type_init’ is deprecated [-Wdeprecated-declarations]
Cleanup-by: Paul Wise <pabs3@bonedaddy.net>

Show diffs side-by-side

added added

removed removed

Lines of Context:
233
233
get_hrm_data()
234
234
{
235
235
#ifdef HAVE_BLUEZ
 
236
#if GLIB_CHECK_VERSION(2,34,0)
 
237
        g_thread_new("get hrm thread", &get_hrm_data_thread, (gpointer) NULL);
 
238
#else
236
239
        g_thread_create(&get_hrm_data_thread, NULL, FALSE, NULL);
 
240
#endif
237
241
#endif /* HAVE_BLUEZ */
238
242
}
239
243