~ubuntu-branches/ubuntu/trusty/nginx/trusty-proposed

« back to all changes in this revision

Viewing changes to src/event/modules/ngx_aio_module.c

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry
  • Date: 2013-04-25 12:51:45 UTC
  • mfrom: (1.3.28)
  • mto: (1.3.29) (15.1.2 experimental)
  • mto: This revision was merged to the branch mainline in revision 64.
  • Revision ID: package-import@ubuntu.com-20130425125145-ugl0wor6bq0u5eae
Tags: upstream-1.4.0
ImportĀ upstreamĀ versionĀ 1.4.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
/*
3
3
 * Copyright (C) Igor Sysoev
 
4
 * Copyright (C) Nginx, Inc.
4
5
 */
5
6
 
6
7
 
7
8
#include <ngx_config.h>
8
9
#include <ngx_core.h>
9
10
#include <ngx_event.h>
10
 
#include <ngx_aio.h>
11
 
 
12
 
#if (NGX_HAVE_KQUEUE)
13
 
#include <ngx_kqueue_module.h>
14
 
#endif
 
11
 
 
12
 
 
13
extern ngx_event_module_t  ngx_kqueue_module_ctx;
15
14
 
16
15
 
17
16
static ngx_int_t ngx_aio_init(ngx_cycle_t *cycle, ngx_msec_t timer);
73
72
};
74
73
 
75
74
 
76
 
 
77
75
#if (NGX_HAVE_KQUEUE)
78
76
 
79
77
static ngx_int_t
134
132
    ngx_log_debug1(NGX_LOG_DEBUG_EVENT, c->log, 0, "aio_cancel: %d", rc);
135
133
 
136
134
    if (rc == AIO_CANCELED) {
137
 
        c->read->active = c->write->active = 0;
 
135
        c->read->active = 0;
 
136
        c->write->active = 0;
138
137
        return NGX_OK;
139
138
    }
140
139
 
141
140
    if (rc == AIO_ALLDONE) {
142
 
        c->read->active = c->write->active = 0;
 
141
        c->read->active = 0;
 
142
        c->write->active = 0;
143
143
        ngx_log_error(NGX_LOG_ALERT, c->log, 0,
144
144
                      "aio_cancel() returned AIO_ALLDONE");
145
145
        return NGX_OK;