Changeset b279013 for owl.h


Ignore:
Timestamp:
Mar 25, 2011, 3:46:46 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Children:
7b2686d
Parents:
e9b037f
git-author:
David Benjamin <davidben@mit.edu> (12/29/10 07:20:12)
git-committer:
David Benjamin <davidben@mit.edu> (03/25/11 03:46:46)
Message:
Start of GMainContext code

Add GSources to feed owl_timer and owl_io_dispatch events into the main
loop. Also add a hack so pre-select actions run at all. Glib's main loop
has a hard priority system, so it prefers that prepare/check hooks
return if the event would actually do anything. We probably want to
replace every pre-select action with a dedicated GSource (or maybe a
bunch of g_idle_add calls).

Signals are also racy right now; glib uses select/poll instead of
pselect/ppoll, so you can't actually listen for signals on the same
thread. (In fact, the single-threaded version of g_child_watch_add
doesn't actually work.) That's okay as what we were doing doesn't work
when you add a second thread and thread safety is sort of the point of
this work.

The AIM hack need also be restored.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.h

    r283ff1e rb279013  
    550550  void (*destroy)(const struct _owl_io_dispatch *);  /* Destructor */
    551551  void *data;
     552  GPollFD pollfd;
    552553} owl_io_dispatch;
    553554
Note: See TracChangeset for help on using the changeset viewer.