|
Libevhtp
1.2.13
|
#include <stdio.h>#include <stdlib.h>#include <stdint.h>#include <limits.h>#include <sys/queue.h>#include <unistd.h>#include <pthread.h>#include <event2/event.h>#include <event2/thread.h>#include "internal.h"#include "evhtp/thread.h"
Go to the source code of this file.
Data Structures | |
| struct | evthr_cmd_t |
| struct | evthr_pool |
| struct | evthr |
Macros | |
| #define | _GNU_SOURCE |
| #define | _evthr_read(thr, cmd, sock) (recv(sock, cmd, sizeof(evthr_cmd_t), 0) == sizeof(evthr_cmd_t)) ? 1 : 0 |
Typedefs | |
| typedef struct evthr_pool_slist | evthr_pool_slist_t |
Functions | |
| struct evthr_cmd | __attribute__ ((packed)) |
| TAILQ_HEAD (evthr_pool_slist, evthr) | |
| static void | _evthr_read_cmd (evutil_socket_t sock, short which, void *args) |
| static void * | _evthr_loop (void *args) |
| evthr_res | evthr_defer (evthr_t *thread, evthr_cb cb, void *arg) |
| evthr_res | evthr_stop (evthr_t *thread) |
| evbase_t * | evthr_get_base (evthr_t *thr) |
| void | evthr_set_aux (evthr_t *thr, void *aux) |
| void * | evthr_get_aux (evthr_t *thr) |
| int | evthr_set_initcb (evthr_t *thr, evthr_init_cb cb) |
| int | evthr_set_exitcb (evthr_t *thr, evthr_exit_cb cb) |
| static evthr_t * | _evthr_new (evthr_init_cb init_cb, evthr_exit_cb exit_cb, void *args) |
| evthr_t * | evthr_new (evthr_init_cb init_cb, void *args) |
| evthr_t * | evthr_wexit_new (evthr_init_cb init_cb, evthr_exit_cb exit_cb, void *args) |
| int | evthr_start (evthr_t *thread) |
| void | evthr_free (evthr_t *thread) |
| void | evthr_pool_free (evthr_pool_t *pool) |
| evthr_res | evthr_pool_stop (evthr_pool_t *pool) |
| evthr_res | evthr_pool_defer (evthr_pool_t *pool, evthr_cb cb, void *arg) |
| static evthr_pool_t * | _evthr_pool_new (int nthreads, evthr_init_cb init_cb, evthr_exit_cb exit_cb, void *shared) |
| evthr_pool_t * | evthr_pool_new (int nthreads, evthr_init_cb init_cb, void *shared) |
| evthr_pool_t * | evthr_pool_wexit_new (int nthreads, evthr_init_cb init_cb, evthr_exit_cb exit_cb, void *shared) |
| int | evthr_pool_start (evthr_pool_t *pool) |
Variables | |
| uint8_t | stop |
| void * | args |
| evthr_cb | cb |
| struct evthr_pool | __attribute__ |
| #define _evthr_read | ( | thr, | |
| cmd, | |||
| sock | |||
| ) | (recv(sock, cmd, sizeof(evthr_cmd_t), 0) == sizeof(evthr_cmd_t)) ? 1 : 0 |
| typedef struct evthr_pool_slist evthr_pool_slist_t |
| struct evthr_cmd __attribute__ | ( | (packed) | ) |
|
static |
|
static |
|
static |
|
static |
| evthr_res evthr_defer | ( | evthr_t * | thread, |
| evthr_cb | cb, | ||
| void * | arg | ||
| ) |
| void evthr_free | ( | evthr_t * | thread | ) |
| evbase_t* evthr_get_base | ( | evthr_t * | thr | ) |
| evthr_t* evthr_new | ( | evthr_init_cb | init_cb, |
| void * | args | ||
| ) |
| evthr_res evthr_pool_defer | ( | evthr_pool_t * | pool, |
| evthr_cb | cb, | ||
| void * | arg | ||
| ) |
| void evthr_pool_free | ( | evthr_pool_t * | pool | ) |
| evthr_pool_t* evthr_pool_new | ( | int | nthreads, |
| evthr_init_cb | init_cb, | ||
| void * | shared | ||
| ) |
| int evthr_pool_start | ( | evthr_pool_t * | pool | ) |
| evthr_res evthr_pool_stop | ( | evthr_pool_t * | pool | ) |
| evthr_pool_t* evthr_pool_wexit_new | ( | int | nthreads, |
| evthr_init_cb | init_cb, | ||
| evthr_exit_cb | exit_cb, | ||
| void * | shared | ||
| ) |
| int evthr_set_exitcb | ( | evthr_t * | thr, |
| evthr_exit_cb | cb | ||
| ) |
| int evthr_set_initcb | ( | evthr_t * | thr, |
| evthr_init_cb | cb | ||
| ) |
| int evthr_start | ( | evthr_t * | thread | ) |
| evthr_res evthr_stop | ( | evthr_t * | thread | ) |
| evthr_t* evthr_wexit_new | ( | evthr_init_cb | init_cb, |
| evthr_exit_cb | exit_cb, | ||
| void * | args | ||
| ) |
| TAILQ_HEAD | ( | evthr_pool_slist | , |
| evthr | |||
| ) |
| struct evthr_pool __attribute__ |