view src/event/ngx_event_posted.h @ 6488:a57b2b8999e7

SSL: initialization changes for OpenSSL 1.1.0. OPENSSL_config() deprecated in OpenSSL 1.1.0. Additionally, SSL_library_init(), SSL_load_error_strings() and OpenSSL_add_all_algorithms() are no longer available if OPENSSL_API_COMPAT is set to 0x10100000L. The OPENSSL_init_ssl() function is now used instead with appropriate arguments to trigger the same behaviour. The configure test changed to use SSL_CTX_set_options(). Deinitialization now happens automatically in OPENSSL_cleanup() called via atexit(3), so we no longer call EVP_cleanup() and ENGINE_cleanup() directly.
author Maxim Dounin <mdounin@mdounin.ru>
date Thu, 31 Mar 2016 23:38:33 +0300
parents 3d4730eada9c
children 9d2ad2fb4423
line wrap: on
line source


/*
 * Copyright (C) Igor Sysoev
 * Copyright (C) Nginx, Inc.
 */


#ifndef _NGX_EVENT_POSTED_H_INCLUDED_
#define _NGX_EVENT_POSTED_H_INCLUDED_


#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_event.h>


#define ngx_post_event(ev, q)                                                 \
                                                                              \
    if (!(ev)->posted) {                                                      \
        (ev)->posted = 1;                                                     \
        ngx_queue_insert_tail(q, &(ev)->queue);                               \
                                                                              \
        ngx_log_debug1(NGX_LOG_DEBUG_CORE, (ev)->log, 0, "post event %p", ev);\
                                                                              \
    } else  {                                                                 \
        ngx_log_debug1(NGX_LOG_DEBUG_CORE, (ev)->log, 0,                      \
                       "update posted event %p", ev);                         \
    }


#define ngx_delete_posted_event(ev)                                           \
                                                                              \
    (ev)->posted = 0;                                                         \
    ngx_queue_remove(&(ev)->queue);                                           \
                                                                              \
    ngx_log_debug1(NGX_LOG_DEBUG_CORE, (ev)->log, 0,                          \
                   "delete posted event %p", ev);



void ngx_event_process_posted(ngx_cycle_t *cycle, ngx_queue_t *posted);


extern ngx_queue_t  ngx_posted_accept_events;
extern ngx_queue_t  ngx_posted_events;


#endif /* _NGX_EVENT_POSTED_H_INCLUDED_ */