Show
Ignore:
Timestamp:
12/17/07 05:43:26 (7 years ago)
Author:
Theo Schlossnagle <jesus@omniti.com>
git-committer:
Theo Schlossnagle <jesus@omniti.com> 1197870206 +0000
git-parent:

[cd1ab55918856e8682710ede8ef2e44377887173]

git-author:
Theo Schlossnagle <jesus@omniti.com> 1197870206 +0000
Message:

more work... fleshing out the eventer

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • src/noitd.c

    rcd1ab55 rb62cf2b  
    55#include <stdlib.h> 
    66 
     7int stdin_handler(eventer_t e, int mask, void *closure, struct timeval *now) { 
     8  fprintf(stderr, "in stdin_handler:\n"); 
     9  return EVENTER_READ; 
     10} 
     11void stdin_sample() { 
     12  eventer_t e; 
     13  e = eventer_alloc(); 
     14  e->fd = 0; 
     15  e->mask = EVENTER_READ; 
     16  e->callback = stdin_handler; 
     17  eventer_add(e); 
     18} 
    719int main(int argc, char **argv) { 
    820  if(eventer_choose("kqueue") == -1) { 
     
    1426    exit(-1); 
    1527  } 
     28 
     29  stdin_sample(); 
     30  eventer_loop(); 
    1631  return 0; 
    1732}