3 * Copyright (C) Igor Sysoev
7 #ifndef _NGX_EVENT_BUSY_LOCK_H_INCLUDED_
8 #define _NGX_EVENT_BUSY_LOCK_H_INCLUDED_
11 #include <ngx_config.h>
13 #include <ngx_event.h>
15 typedef struct ngx_event_busy_lock_ctx_s ngx_event_busy_lock_ctx_t;
17 struct ngx_event_busy_lock_ctx_s {
19 ngx_event_handler_pt handler;
25 unsigned cache_updated:1;
30 ngx_event_busy_lock_ctx_t *next;
43 ngx_uint_t max_waiting;
45 ngx_event_busy_lock_ctx_t *events;
46 ngx_event_busy_lock_ctx_t *last;
51 } ngx_event_busy_lock_t;
54 ngx_int_t ngx_event_busy_lock(ngx_event_busy_lock_t *bl,
55 ngx_event_busy_lock_ctx_t *ctx);
56 ngx_int_t ngx_event_busy_lock_cacheable(ngx_event_busy_lock_t *bl,
57 ngx_event_busy_lock_ctx_t *ctx);
58 void ngx_event_busy_unlock(ngx_event_busy_lock_t *bl,
59 ngx_event_busy_lock_ctx_t *ctx);
60 void ngx_event_busy_lock_cancel(ngx_event_busy_lock_t *bl,
61 ngx_event_busy_lock_ctx_t *ctx);
64 #endif /* _NGX_EVENT_BUSY_LOCK_H_INCLUDED_ */