root/src/eventer/eventer.c

Revision 01751d3c6a2df6acc30c50e9cd1cce9064262450, 0.5 kB (checked in by Theo Schlossnagle <jesus@omniti.com>, 11 years ago)

still nothing working, but substantially more plumbing

  • Property mode set to 100644
Line 
1 #include "eventer/eventer.h"
2 #include "eventer/eventer_impl.h"
3 #include "eventer/eventer_POSIX_fd_opset.h"
4
5 eventer_t eventer_alloc() {
6   eventer_t e;
7   e = calloc(1, sizeof(*e));
8   e->opset = eventer_POSIX_fd_opset;
9   return e;
10 }
11
12 void eventer_free(eventer_t e) {
13   free(e);
14 }
15
16 int eventer_choose(const char *name) {
17   int i;
18   eventer_impl_t choice;
19   for(choice = registered_eventers[0]; choice; choice++) {
20     if(!strcmp(choice->name, name)) {
21       __eventer = choice;
22       return 0;
23     }
24   }
25   return -1;
26 }
Note: See TracBrowser for help on using the browser.