Changeset 3ecd78b for select.c


Ignore:
Timestamp:
Sep 18, 2010, 3:14:30 PM (14 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.7, release-1.8, release-1.9
Children:
de6f317
Parents:
8402a093
git-author:
David Benjamin <davidben@mit.edu> (09/14/10 16:52:41)
git-committer:
David Benjamin <davidben@mit.edu> (09/18/10 15:14:30)
Message:
Move the event loop to owl_select as owl_select_run_loop

Also adds a function to quit the select loop so that owl_function_quit
needn't exit() directly. main should be allowed to clean up after
itself.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • select.c

    rc3031f3 r3ecd78b  
    33static int dispatch_active = 0;
    44static int psa_active = 0;
     5static int loop_active = 0;
    56
    67int _owl_select_timer_cmp(const owl_timer *t1, const owl_timer *t2) {
     
    436437  }
    437438}
     439
     440void owl_select_run_loop(void)
     441{
     442  loop_active = 1;
     443  while (loop_active) {
     444    owl_select();
     445  }
     446}
     447
     448void owl_select_quit_loop(void)
     449{
     450  loop_active = 0;
     451}
Note: See TracChangeset for help on using the changeset viewer.