Back to home page

Nginx displayed by LXR

Source navigation ]
Diff markup ]
Identifier search ]
general search ]
 
 
Version: nginx-1.15.11 ]​[ nginx-1.14.2 ]​

0001 
0002 /*
0003  * Copyright (C) Igor Sysoev
0004  * Copyright (C) Nginx, Inc.
0005  */
0006 
0007 
0008 #ifndef _NGX_EVENT_POSTED_H_INCLUDED_
0009 #define _NGX_EVENT_POSTED_H_INCLUDED_
0010 
0011 
0012 #include <ngx_config.h>
0013 #include <ngx_core.h>
0014 #include <ngx_event.h>
0015 
0016 
0017 #define ngx_post_event(ev, q)                                                 \
0018                                                                               \
0019     if (!(ev)->posted) {                                                      \
0020         (ev)->posted = 1;                                                     \
0021         ngx_queue_insert_tail(q, &(ev)->queue);                               \
0022                                                                               \
0023         ngx_log_debug1(NGX_LOG_DEBUG_CORE, (ev)->log, 0, "post event %p", ev);\
0024                                                                               \
0025     } else  {                                                                 \
0026         ngx_log_debug1(NGX_LOG_DEBUG_CORE, (ev)->log, 0,                      \
0027                        "update posted event %p", ev);                         \
0028     }
0029 
0030 
0031 #define ngx_delete_posted_event(ev)                                           \
0032                                                                               \
0033     (ev)->posted = 0;                                                         \
0034     ngx_queue_remove(&(ev)->queue);                                           \
0035                                                                               \
0036     ngx_log_debug1(NGX_LOG_DEBUG_CORE, (ev)->log, 0,                          \
0037                    "delete posted event %p", ev);
0038 
0039 
0040 
0041 void ngx_event_process_posted(ngx_cycle_t *cycle, ngx_queue_t *posted);
0042 
0043 
0044 extern ngx_queue_t  ngx_posted_accept_events;
0045 extern ngx_queue_t  ngx_posted_events;
0046 
0047 
0048 #endif /* _NGX_EVENT_POSTED_H_INCLUDED_ */