File: fdset.h

package info (click to toggle)
linuxtv-dvb-apps 1.1.1%2Brev1483-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 7,556 kB
  • sloc: ansic: 48,832; makefile: 792; perl: 236; sh: 110; xml: 13
file content (28 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (7)
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
#ifndef FDSET_H
#define FDSET_H

#include "dllist.h"


struct fdset
{
    struct dl_head list[1];
    int del_count;
};


struct fdset_node /*internal*/
{
    struct dl_node node[1];
    int fd;
    void (*handler)(void *data, int fd);
    void *data;
};

extern struct fdset fds[1]; /* global fd list */

int fdset_init(struct fdset *fds);
int fdset_add_fd(struct fdset *fds, int fd, void *handler, void *data);
int fdset_del_fd(struct fdset *fds, int fd);
int fdset_select(struct fdset *fds, int timeout /*millisec*/);
#endif