From 16cbf3c076a0aca6d47adaf3f719493674cf2363 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Tue, 17 Jan 2017 20:00:00 +0300 Subject: Initial version. --- src/nxt_main.h | 180 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 src/nxt_main.h (limited to 'src/nxt_main.h') diff --git a/src/nxt_main.h b/src/nxt_main.h new file mode 100644 index 00000000..24fb80cd --- /dev/null +++ b/src/nxt_main.h @@ -0,0 +1,180 @@ + +/* + * Copyright (C) Igor Sysoev + * Copyright (C) NGINX, Inc. + */ + +#ifndef _NXT_LIB_H_INCLUDED_ +#define _NXT_LIB_H_INCLUDED_ + + +#include + +#include +#include +#include +#include +#include + +typedef struct nxt_thread_s nxt_thread_t; +#include + +typedef struct nxt_mem_pool_s nxt_mem_pool_t; +#include + +#include +#include + +#include +#include +#include +#include + +typedef struct nxt_log_s nxt_log_t; +#include + + +#include +#include +#include +#include +#include + + +/* TODO: remove unused */ + +typedef struct nxt_event_fd_s nxt_event_fd_t; +typedef struct nxt_sockaddr_s nxt_sockaddr_t; + + +#include +#include +#include +#include +#include + +#include + + +typedef void *(*nxt_mem_proto_alloc_t)(void *pool, size_t size); +typedef void (*nxt_mem_proto_free_t)(void *pool, void *p); + +typedef struct { + nxt_mem_proto_alloc_t alloc; + nxt_mem_proto_free_t free; +} nxt_mem_proto_t; + + +#include +#include +#include +#include + +typedef struct nxt_event_engine_s nxt_event_engine_t; +#include +#include + +typedef struct nxt_thread_pool_s nxt_thread_pool_t; +#include + +#include +#if (NXT_THREADS) +#include +#endif + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +typedef struct nxt_buf_s nxt_buf_t; +#include +#include +#include + +typedef struct nxt_event_conn_s nxt_event_conn_t; +#include + +#include + +#if (NXT_SSLTLS) +#include +#endif + + +#define \ +nxt_thread() \ + (nxt_thread_t *) nxt_thread_get_data(nxt_thread_context) + +nxt_thread_extern_data(nxt_thread_t, nxt_thread_context); + + +#include + +#include + +#include +#if (NXT_THREADS) +#include +#endif + + +typedef void (*nxt_event_conn_handler_t)(nxt_thread_t *thr, + nxt_event_conn_t *c); +#include + +#include + +#include + +#include +#include + +#include +#include +#include + +#include +#include + +#include + +#include +typedef struct nxt_upstream_source_s nxt_upstream_source_t; + +#include +#include +#include +#include +#include +#include + + +#if (NXT_LIB_UNIT_TEST) +#include <../test/nxt_lib_unit_test.h> +#else +#define NXT_LIB_UNIT_TEST_STATIC static +#endif + + +/* + * The envp argument must be &environ if application may + * change its process title with nxt_process_title(). + */ +NXT_EXPORT nxt_int_t nxt_lib_start(const char *app, char **argv, char ***envp); +NXT_EXPORT void nxt_lib_stop(void); + + +NXT_EXPORT extern nxt_uint_t nxt_ncpu; +NXT_EXPORT extern nxt_uint_t nxt_pagesize; +NXT_EXPORT extern nxt_random_t nxt_random_data; + + +#endif /* _NXT_LIB_H_INCLUDED_ */ -- cgit