Mercurial > hg > nginx-quic
comparison src/event/modules/ngx_kqueue_module.c @ 90:37530da31268
nginx-0.0.1-2003-05-16-19:27:48 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Fri, 16 May 2003 15:27:48 +0000 |
parents | 5f6d848dcbef |
children | 637625a2acdb |
comparison
equal
deleted
inserted
replaced
89:29bf798b583f | 90:37530da31268 |
---|---|
8 #include <ngx_types.h> | 8 #include <ngx_types.h> |
9 #include <ngx_log.h> | 9 #include <ngx_log.h> |
10 #include <ngx_connection.h> | 10 #include <ngx_connection.h> |
11 #include <ngx_event.h> | 11 #include <ngx_event.h> |
12 #include <ngx_event_timer.h> | 12 #include <ngx_event_timer.h> |
13 #include <ngx_conf_file.h> | |
13 #include <ngx_kqueue_module.h> | 14 #include <ngx_kqueue_module.h> |
14 | 15 |
15 | 16 |
16 /* STUB */ | 17 /* STUB */ |
17 #define KQUEUE_NCHANGES 512 | 18 #define KQUEUE_NCHANGES 512 |
18 #define KQUEUE_NEVENTS 512 | 19 #define KQUEUE_NEVENTS 512 |
20 | |
21 | |
22 static int ngx_kqueue_changes; | |
23 static int ngx_kqueue_events; | |
19 | 24 |
20 | 25 |
21 /* should be per-thread if threads are used without thread pool */ | 26 /* should be per-thread if threads are used without thread pool */ |
22 #if 1 | 27 #if 1 |
23 int kq; | 28 int kq; |
28 static unsigned int nchanges; | 33 static unsigned int nchanges; |
29 static int nevents; | 34 static int nevents; |
30 | 35 |
31 static ngx_event_t *timer_queue; | 36 static ngx_event_t *timer_queue; |
32 /* */ | 37 /* */ |
38 | |
39 | |
40 static ngx_str_t kqueue_name = ngx_string("kqueue"); | |
41 | |
42 static ngx_command_t ngx_kqueue_commands[] = { | |
43 | |
44 {ngx_string("kqueue_changes"), | |
45 NGX_EVENT_CONF|NGX_CONF_TAKE1, | |
46 ngx_conf_set_num_slot, | |
47 0, | |
48 addressof(ngx_kqueue_changes), | |
49 NULL}, | |
50 | |
51 {ngx_string("kqueue_events"), | |
52 NGX_EVENT_CONF|NGX_CONF_TAKE1, | |
53 ngx_conf_set_num_slot, | |
54 0, | |
55 addressof(ngx_kqueue_events), | |
56 NULL}, | |
57 | |
58 {ngx_string(""), 0, NULL, 0, 0, NULL} | |
59 }; | |
60 | |
61 ngx_module_t ngx_kqueue_module = { | |
62 &kqueue_name, /* module context */ | |
63 0, /* module index */ | |
64 ngx_kqueue_commands, /* module directives */ | |
65 NGX_EVENT_MODULE_TYPE, /* module type */ | |
66 NULL /* init module */ | |
67 }; | |
68 | |
33 | 69 |
34 | 70 |
35 int ngx_kqueue_init(int max_connections, ngx_log_t *log) | 71 int ngx_kqueue_init(int max_connections, ngx_log_t *log) |
36 { | 72 { |
37 int change_size, event_size; | 73 int change_size, event_size; |