2 * Copyright (C) 2010 Felix Fietkau <nbd@openwrt.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
29 typedef void (*uloop_fd_handler
)(struct uloop_fd
*u
, unsigned int events
);
30 typedef void (*uloop_timeout_handler
)(struct uloop_timeout
*t
);
32 #define ULOOP_READ (1 << 0)
33 #define ULOOP_WRITE (1 << 1)
34 #define ULOOP_EDGE_TRIGGER (1 << 2)
47 uloop_timeout_handler cb
;
48 struct uloop_timeout
*prev
;
49 struct uloop_timeout
*next
;
54 int uloop_fd_add(struct uloop_fd
*sock
, unsigned int flags
);
55 int uloop_fd_delete(struct uloop_fd
*sock
);
57 int uloop_timeout_add(struct uloop_timeout
*timeout
);
58 int uloop_timeout_set(struct uloop_timeout
*timeout
, int msecs
);
59 int uloop_timeout_cancel(struct uloop_timeout
*timeout
);
64 void uloop_done(void);