|
libonion
|
#include <errno.h>#include <sys/epoll.h>#include <string.h>#include <stdio.h>#include <stdlib.h>#include <limits.h>#include <time.h>#include <unistd.h>#include <sys/timerfd.h>#include <fcntl.h>#include <assert.h>#include "log.h"#include "types.h"#include "poller.h"#include "low.h"#include <sys/resource.h>#include <sys/socket.h>#include <sys/eventfd.h>Data Structures | |
| struct | onion_poller_t |
| Manages the polling on a set of file descriptors. More... | |
| struct | onion_poller_slot_t |
| Data about a poller element: timeout, function to call shutdown function. | |
Macros | |
| #define | pthread_mutex_init(...) |
| #define | pthread_mutex_lock(...) |
| #define | pthread_mutex_trylock(...) (0) |
| #define | pthread_mutex_unlock(...) |
| #define | EFD_CLOEXEC 0 |
Functions | |
| void | onion_poller_slot_set_type (onion_poller_slot *el, onion_poller_slot_type_e type) |
| Sets the polling type: read/write/other. O_POLL_READ | O_POLL_WRITE | O_POLL_OTHER. | |
| onion_poller_slot * | onion_poller_get (onion_poller *poller, int fd) |
| Gets the poller slotThis might be used for long polling, removing the default deleter. | |
| void | onion_poller_set_queue_size_per_thread (onion_poller *poller, size_t count) |
| Sets the max events per thread queue size.This fine tune allows to change the queue of events per thread. | |
| #define EFD_CLOEXEC 0 |
Referenced by onion_poller_t::onion_poller_new().
| #define pthread_mutex_init | ( | ... | ) |
| #define pthread_mutex_lock | ( | ... | ) |
Referenced by onion_client_data(), onion_dict_t::onion_dict_dup(), onion_dict_t::onion_dict_free(), onion_free(), onion_poller_t::onion_poller_add(), onion_poller_t::onion_poller_poll(), onion_poller_t::onion_poller_remove(), onion_poller_t::onion_poller_stop(), onion_sessions_redis_save(), onion_sessions_sqlite3_save(), and onion_set_client_data().
| #define pthread_mutex_trylock | ( | ... | ) | (0) |
Referenced by onion_poller_t::onion_poller_free().
| #define pthread_mutex_unlock | ( | ... | ) |
Referenced by onion_client_data(), onion_dict_t::onion_dict_dup(), onion_dict_t::onion_dict_free(), onion_free(), onion_poller_t::onion_poller_add(), onion_poller_t::onion_poller_free(), onion_poller_t::onion_poller_poll(), onion_poller_t::onion_poller_remove(), onion_poller_t::onion_poller_stop(), onion_sessions_redis_save(), onion_sessions_sqlite3_save(), and onion_set_client_data().
| onion_poller_slot empty_slot |
| rlim_t max_slots |
| int refcount |
| onion_poller_slot* slots |
1.8.1.2