ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/iom.h
(Generate patch)

Comparing gvpe/src/iom.h (file contents):
Revision 1.24 by pcg, Fri Nov 12 10:23:33 2004 UTC vs.
Revision 1.27 by pcg, Thu Mar 3 16:54:34 2005 UTC

1/* 1/*
2 iom.h -- generic I/O multiplexer 2 iom.h -- generic I/O multiplexer
3 Copyright (C) 2003, 2004 Marc Lehmann <pcg@goof.com> 3 Copyright (C) 2003, 2004 Marc Lehmann <gvpe@schmorp.de>
4 4
5 This file is part of GVPE.
6
5 This program is free software; you can redistribute it and/or modify 7 GVPE is free software; you can redistribute it and/or modify
6 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
7 the Free Software Foundation; either version 2 of the License, or 9 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 10 (at your option) any later version.
9 11
10 This program is distributed in the hope that it will be useful, 12 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details. 15 GNU General Public License for more details.
14 16
15 You should have received a copy of the GNU General Public License 17 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software 18 along with gvpe; if not, write to the Free Software
17 Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18*/ 20*/
19 21
20#ifndef IOM_H__ 22#ifndef IOM_H__
21#define IOM_H__ 23#define IOM_H__
40#ifndef IOM_IDLE 42#ifndef IOM_IDLE
41# define IOM_IDLE 0 43# define IOM_IDLE 0
42#endif 44#endif
43#ifndef IOM_SIG 45#ifndef IOM_SIG
44# define IOM_SIG 0 46# define IOM_SIG 0
45#endif
46#ifndef IOM_ACCURACY
47# define IOM_ACCURACY 0.001 // start timers at most this much earlier (can be 0)
48#endif 47#endif
49 48
50typedef double tstamp; 49typedef double tstamp;
51extern tstamp NOW; 50extern tstamp NOW;
52 51
87 86
88 template<class watcher> 87 template<class watcher>
89 static void unreg (watcher &w, io_manager_vec<watcher> &queue); 88 static void unreg (watcher &w, io_manager_vec<watcher> &queue);
90 89
91public: 90public:
91#if IOM_TIME
92 // fetch time only
93 static tstamp now ();
94
95 // set NOW
96 static void set_now ();
97#endif
98
92 // register a watcher 99 // register a watcher
93#if IOM_IO 100#if IOM_IO
94 static void reg (io_watcher &w); static void unreg (io_watcher &w); 101 static void reg (io_watcher &w); static void unreg (io_watcher &w);
95#endif 102#endif
96#if IOM_TIME 103#if IOM_TIME

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines