Skip to content
This repository
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 24 lines (16 sloc) 0.461 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#ifndef __EVENT_H__
#define __EVENT_H__

#include "list.h"

struct event_info;

typedef void (*event_handler_t)(int fd, int events, void *data);

int init_event(int nr);
int register_event(int fd, event_handler_t h, void *data);
void unregister_event(int fd);
int modify_event(int fd, unsigned int events);
void event_loop(int timeout);

struct timer {
void (*callback)(void *);
void *data;
};

void add_timer(struct timer *t, unsigned int mseconds);

#endif
Something went wrong with that request. Please try again.