Changeset 0792d99


Ignore:
Timestamp:
Oct 29, 2012, 11:18:51 PM (11 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.10
Children:
a90bd2f, c42a8d1, a902ebb
Parents:
cb124fc6
git-author:
Anders Kaseorg <andersk@mit.edu> (06/26/12 01:57:44)
git-committer:
Anders Kaseorg <andersk@mit.edu> (10/29/12 23:18:51)
Message:
Replace deprecated GLib < 2.31.0 thread APIs

As of GLib 2.31.0,
 - threading is now always enabled in GLib
 - libgthread is now an empty shell and g_thread_init() is no longer
   required (and has been deprecated)
 - simplified new thread creation API with the old API deprecated.  The
   concept of joinability has disappeared (all threads are joinable) as
   have priority levels, 'bound'ness (ie: kernel vs. userspace threads)
   and ability to manipulate the stack size.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • global.c

    rcb124fc6 r0792d99  
    1010
    1111  g_type_init();
     12#if !GLIB_CHECK_VERSION(2, 31, 0)
    1213  g_thread_init(NULL);
     14#endif
    1315
    1416  owl_select_init();
  • logging.c

    r0a9ffc5 r0792d99  
    436436void owl_log_init(void)
    437437{
     438  log_context = g_main_context_new();
     439#if GLIB_CHECK_VERSION(2, 31, 0)
     440  logging_thread = g_thread_new("logging",
     441                                owl_log_thread_func,
     442                                NULL);
     443#else
    438444  GError *error = NULL;
    439   log_context = g_main_context_new();
    440445  logging_thread = g_thread_create(owl_log_thread_func,
    441446                                   NULL,
     
    448453    exit(1);
    449454  }
     455#endif
    450456 
    451457}
Note: See TracChangeset for help on using the changeset viewer.