File: select.h

package info (click to toggle)
notion 4.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 4,656 kB
  • sloc: ansic: 47,365; sh: 2,093; makefile: 594; perl: 270
file content (33 lines) | stat: -rw-r--r-- 715 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * ion/mainloop/select.h
 *
 * Based on a contributed readfds code.
 *
 * See the included file LICENSE for details.
 */

#ifndef ION_LIBMAINLOOP_SELECT_H
#define ION_LIBMAINLOOP_SELECT_H

#include <stdlib.h>
#include <unistd.h>
#include <sys/time.h>
#include <libtu/obj.h>
#include <libtu/types.h>

INTRSTRUCT(WInputFd);

DECLSTRUCT(WInputFd){
    int fd;
    void *data;
    void (*process_input_fn)(int fd, void *data);
    WInputFd *next, *prev;
};

extern bool mainloop_register_input_fd(int fd, void *data,
                                       void (*callback)(int fd, void *data));
extern void mainloop_unregister_input_fd(int fd);

extern void mainloop_select();

#endif /* ION_LIBMAINLOOP_SELECT_H */