queue.h - quark - quark web server
git clone git://git.suckless.org/quark
Log
Files
Refs
LICENSE
---
queue.h (678B)
---
     1 #ifndef QUEUE_H
     2 #define QUEUE_H
     3 
     4 #include 
     5 
     6 #ifdef __linux__
     7         #include 
     8 
     9         typedef struct epoll_event queue_event;
    10 #else
    11         #include 
    12         #include 
    13         #include 
    14 
    15         typedef struct kevent queue_event;
    16 #endif
    17 
    18 enum queue_event_type {
    19         QUEUE_EVENT_IN,
    20         QUEUE_EVENT_OUT,
    21 };
    22 
    23 int queue_create(void);
    24 int queue_add_fd(int, int, enum queue_event_type, int, const void *);
    25 int queue_mod_fd(int, int, enum queue_event_type, const void *);
    26 int queue_rem_fd(int, int);
    27 ssize_t queue_wait(int, queue_event *, size_t);
    28 
    29 void *queue_event_get_data(const queue_event *);
    30 
    31 int queue_event_is_error(const queue_event *e);
    32 
    33 #endif /* QUEUE_H */