diff options
| author | Quentin Carbonneaux | 2014-07-20 12:47:11 -0400 |
|---|---|---|
| committer | Quentin Carbonneaux | 2014-07-20 12:53:04 -0400 |
| commit | ab00c0bf43205f9cd540f1389ac4a2bf62cc8db2 (patch) | |
| tree | 270a523f0d235e55db6e37514c36f2875b4d77b5 | |
| parent | d344965b94e38f2138fd3e60e4077bbbd3147998 (diff) | |
expose file descriptors in evnt callbacks
| -rw-r--r-- | evnt.c | 2 | ||||
| -rw-r--r-- | evnt.h | 2 | ||||
| -rw-r--r-- | exec.c | 2 | ||||
| -rw-r--r-- | main.c | 3 |
4 files changed, 5 insertions, 4 deletions
@@ -57,7 +57,7 @@ ev_loop() i++; continue; } - if (elist[i].f(flags, elist[i].p)) { + if (elist[i].f(elist[i].fd, flags, elist[i].p)) { ne--; memmove(&elist[i], &elist[i+1], (ne - i) * sizeof(E)); continue; @@ -11,7 +11,7 @@ enum { struct e { int fd; int flags; - int (*f)(int, void *); + int (*f)(int, int, void *); void *p; }; @@ -197,7 +197,7 @@ struct Run { }; static int -runev(int flag, void *data) +runev(int fd, int flag, void *data) { struct Run *r; @@ -24,10 +24,11 @@ die(char *m) } static int -gev(int flag, void *unused) +gev(int fd, int flag, void *unused) { GEvent e; + (void) fd; assert(flag == ERead && unused == 0); while (g->nextevent(&e) != 0) { |
