1 | /* |
1 | /* |
2 | iom.h -- generic I/O multiplexer |
2 | iom.h -- generic I/O multiplexer |
3 | Copyright (C) 2003, 2004 Marc Lehmann <gvpe@schmorp.de> |
3 | Copyright (C) 2003-2006 Marc Lehmann <gvpe@schmorp.de> |
4 | |
4 | |
5 | This file is part of GVPE. |
5 | This file is part of GVPE. |
6 | |
6 | |
7 | GVPE is free software; you can redistribute it and/or modify |
7 | GVPE is free software; you can redistribute it and/or modify |
8 | it under the terms of the GNU General Public License as published by |
8 | it under the terms of the GNU General Public License as published by |
… | |
… | |
115 | }; |
115 | }; |
116 | |
116 | |
117 | struct watcher { |
117 | struct watcher { |
118 | int active; /* 0 == inactive, else index into respective vector */ |
118 | int active; /* 0 == inactive, else index into respective vector */ |
119 | |
119 | |
|
|
120 | bool is_active () { return active; } |
|
|
121 | |
120 | watcher () : active (0) { } |
122 | watcher () : active (0) { } |
121 | }; |
123 | }; |
122 | |
124 | |
123 | #if IOM_IO |
125 | #if IOM_IO |
124 | enum { EVENT_UNDEF = -1, EVENT_NONE = 0, EVENT_READ = 1, EVENT_WRITE = 2 }; |
126 | enum { EVENT_UNDEF = -1, EVENT_NONE = 0, EVENT_READ = 1, EVENT_WRITE = 2 }; |