summaryrefslogtreecommitdiff
path: root/src/dged/reactor.h
blob: e54afdaa6e5d1f0e0bdb3975ff5c15be3ed545bb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <stdbool.h>
#include <stdint.h>

enum interest {
  ReadInterest = 1,
  WriteInterest = 2,
};

struct reactor;

struct reactor *reactor_create();
void reactor_destroy(struct reactor *reactor);
void reactor_update(struct reactor *reactor);
bool reactor_poll_event(struct reactor *reactor, uint32_t ev_id);
uint32_t reactor_register_interest(struct reactor *reactor, int fd,
                                   enum interest interest);
void reactor_unregister_interest(struct reactor *reactor, uint32_t ev_id);