forked from libevent/libevent
-
Notifications
You must be signed in to change notification settings - Fork 7
/
epolltable-internal.h
1166 lines (1147 loc) · 40.4 KB
/
epolltable-internal.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Copyright (c) 2000-2007 Niels Provos <provos@citi.umich.edu>
* Copyright (c) 2007-2012 Niels Provos and Nick Mathewson
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef EPOLLTABLE_INTERNAL_H_INCLUDED_
#define EPOLLTABLE_INTERNAL_H_INCLUDED_
/*
Here are the values we're masking off to decide what operations to do.
Note that since EV_READ|EV_WRITE.
Note also that this table is a little sparse, since ADD+DEL is
nonsensical ("xxx" in the list below.)
Note also that we are shifting old_events by only 5 bits, since
EV_READ is 2 and EV_WRITE is 4.
The table was auto-generated with a python script, according to this
pseudocode:[*0]
If either the read or the write change is add+del:
This is impossible; Set op==-1, events=0.
Else, if either the read or the write change is add:
Set events to 0.
If the read change is add, or
(the read change is not del, and ev_read is in old_events):
Add EPOLLIN to events.
If the write change is add, or
(the write change is not del, and ev_write is in old_events):
Add EPOLLOUT to events.
If old_events is set:
Set op to EPOLL_CTL_MOD [*1,*2]
Else:
Set op to EPOLL_CTL_ADD [*3]
Else, if the read or the write change is del:
Set op to EPOLL_CTL_DEL.
If the read change is del:
If the write change is del:
Set events to EPOLLIN|EPOLLOUT
Else if ev_write is in old_events:
Set events to EPOLLOUT
Set op to EPOLL_CTL_MOD
Else
Set events to EPOLLIN
Else:
{The write change is del.}
If ev_read is in old_events:
Set events to EPOLLIN
Set op to EPOLL_CTL_MOD
Else:
Set the events to EPOLLOUT
Else:
There is no read or write change; set op to 0 and events to 0.
The logic is a little tricky, since we had no events set on the fd before,
we need to set op="ADD" and set events=the events we want to add. If we
had any events set on the fd before, and we want any events to remain on
the fd, we need to say op="MOD" and set events=the events we want to
remain. But if we want to delete the last event, we say op="DEL" and
set events=(any non-null pointer).
[*0] Actually, the Python script has gotten a bit more complicated, to
support EPOLLRDHUP.
[*1] This MOD is only a guess. MOD might fail with ENOENT if the file was
closed and a new file was opened with the same fd. If so, we'll retry
with ADD.
[*2] We can't replace this with a no-op even if old_events is the same as
the new events: if the file was closed and reopened, we need to retry
with an ADD. (We do a MOD in this case since "no change" is more
common than "close and reopen", so we'll usually wind up doing 1
syscalls instead of 2.)
[*3] This ADD is only a guess. There is a fun Linux kernel issue where if
you have two fds for the same file (via dup) and you ADD one to an
epfd, then close it, then re-create it with the same fd (via dup2 or an
unlucky dup), then try to ADD it again, you'll get an EEXIST, since the
struct epitem is not actually removed from the struct eventpoll until
the file itself is closed.
EV_CHANGE_ADD==1
EV_CHANGE_DEL==2
EV_READ ==2
EV_WRITE ==4
EV_CLOSED ==0x80
Bit 0: close change is add
Bit 1: close change is del
Bit 2: read change is add
Bit 3: read change is del
Bit 4: write change is add
Bit 5: write change is del
Bit 6: old events had EV_READ
Bit 7: old events had EV_WRITE
Bit 8: old events had EV_CLOSED
*/
#define EPOLL_OP_TABLE_INDEX(c) \
( (((c)->close_change&(EV_CHANGE_ADD|EV_CHANGE_DEL))) | \
(((c)->read_change&(EV_CHANGE_ADD|EV_CHANGE_DEL)) << 2) | \
(((c)->write_change&(EV_CHANGE_ADD|EV_CHANGE_DEL)) << 4) | \
(((c)->old_events&(EV_READ|EV_WRITE)) << 5) | \
(((c)->old_events&(EV_CLOSED)) << 1) \
)
#if EV_READ != 2 || EV_WRITE != 4 || EV_CLOSED != 0x80 || EV_CHANGE_ADD != 1 || EV_CHANGE_DEL != 2
#error "Libevent's internals changed! Regenerate the op_table in epolltable-internal.h"
#endif
static const struct operation {
int events;
int op;
} epoll_op_table[] = {
/* old= 0, write: 0, read: 0, close: 0 */
{ 0, 0 },
/* old= 0, write: 0, read: 0, close:add */
{ EPOLLRDHUP, EPOLL_CTL_ADD },
/* old= 0, write: 0, read: 0, close:del */
{ EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= 0, write: 0, read: 0, close:xxx */
{ 0, 255 },
/* old= 0, write: 0, read:add, close: 0 */
{ EPOLLIN, EPOLL_CTL_ADD },
/* old= 0, write: 0, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_ADD },
/* old= 0, write: 0, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_ADD },
/* old= 0, write: 0, read:add, close:xxx */
{ 0, 255 },
/* old= 0, write: 0, read:del, close: 0 */
{ EPOLLIN, EPOLL_CTL_DEL },
/* old= 0, write: 0, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_ADD },
/* old= 0, write: 0, read:del, close:del */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= 0, write: 0, read:del, close:xxx */
{ 0, 255 },
/* old= 0, write: 0, read:xxx, close: 0 */
{ 0, 255 },
/* old= 0, write: 0, read:xxx, close:add */
{ 0, 255 },
/* old= 0, write: 0, read:xxx, close:del */
{ 0, 255 },
/* old= 0, write: 0, read:xxx, close:xxx */
{ 0, 255 },
/* old= 0, write:add, read: 0, close: 0 */
{ EPOLLOUT, EPOLL_CTL_ADD },
/* old= 0, write:add, read: 0, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_ADD },
/* old= 0, write:add, read: 0, close:del */
{ EPOLLOUT, EPOLL_CTL_ADD },
/* old= 0, write:add, read: 0, close:xxx */
{ 0, 255 },
/* old= 0, write:add, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_ADD },
/* old= 0, write:add, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_ADD },
/* old= 0, write:add, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_ADD },
/* old= 0, write:add, read:add, close:xxx */
{ 0, 255 },
/* old= 0, write:add, read:del, close: 0 */
{ EPOLLOUT, EPOLL_CTL_ADD },
/* old= 0, write:add, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_ADD },
/* old= 0, write:add, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_ADD },
/* old= 0, write:add, read:del, close:xxx */
{ 0, 255 },
/* old= 0, write:add, read:xxx, close: 0 */
{ 0, 255 },
/* old= 0, write:add, read:xxx, close:add */
{ 0, 255 },
/* old= 0, write:add, read:xxx, close:del */
{ 0, 255 },
/* old= 0, write:add, read:xxx, close:xxx */
{ 0, 255 },
/* old= 0, write:del, read: 0, close: 0 */
{ EPOLLOUT, EPOLL_CTL_DEL },
/* old= 0, write:del, read: 0, close:add */
{ EPOLLRDHUP, EPOLL_CTL_ADD },
/* old= 0, write:del, read: 0, close:del */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= 0, write:del, read: 0, close:xxx */
{ 0, 255 },
/* old= 0, write:del, read:add, close: 0 */
{ EPOLLIN, EPOLL_CTL_ADD },
/* old= 0, write:del, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_ADD },
/* old= 0, write:del, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_ADD },
/* old= 0, write:del, read:add, close:xxx */
{ 0, 255 },
/* old= 0, write:del, read:del, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_DEL },
/* old= 0, write:del, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_ADD },
/* old= 0, write:del, read:del, close:del */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= 0, write:del, read:del, close:xxx */
{ 0, 255 },
/* old= 0, write:del, read:xxx, close: 0 */
{ 0, 255 },
/* old= 0, write:del, read:xxx, close:add */
{ 0, 255 },
/* old= 0, write:del, read:xxx, close:del */
{ 0, 255 },
/* old= 0, write:del, read:xxx, close:xxx */
{ 0, 255 },
/* old= 0, write:xxx, read: 0, close: 0 */
{ 0, 255 },
/* old= 0, write:xxx, read: 0, close:add */
{ 0, 255 },
/* old= 0, write:xxx, read: 0, close:del */
{ 0, 255 },
/* old= 0, write:xxx, read: 0, close:xxx */
{ 0, 255 },
/* old= 0, write:xxx, read:add, close: 0 */
{ 0, 255 },
/* old= 0, write:xxx, read:add, close:add */
{ 0, 255 },
/* old= 0, write:xxx, read:add, close:del */
{ 0, 255 },
/* old= 0, write:xxx, read:add, close:xxx */
{ 0, 255 },
/* old= 0, write:xxx, read:del, close: 0 */
{ 0, 255 },
/* old= 0, write:xxx, read:del, close:add */
{ 0, 255 },
/* old= 0, write:xxx, read:del, close:del */
{ 0, 255 },
/* old= 0, write:xxx, read:del, close:xxx */
{ 0, 255 },
/* old= 0, write:xxx, read:xxx, close: 0 */
{ 0, 255 },
/* old= 0, write:xxx, read:xxx, close:add */
{ 0, 255 },
/* old= 0, write:xxx, read:xxx, close:del */
{ 0, 255 },
/* old= 0, write:xxx, read:xxx, close:xxx */
{ 0, 255 },
/* old= r, write: 0, read: 0, close: 0 */
{ 0, 0 },
/* old= r, write: 0, read: 0, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= r, write: 0, read: 0, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= r, write: 0, read: 0, close:xxx */
{ 0, 255 },
/* old= r, write: 0, read:add, close: 0 */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= r, write: 0, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= r, write: 0, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= r, write: 0, read:add, close:xxx */
{ 0, 255 },
/* old= r, write: 0, read:del, close: 0 */
{ EPOLLIN, EPOLL_CTL_DEL },
/* old= r, write: 0, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= r, write: 0, read:del, close:del */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= r, write: 0, read:del, close:xxx */
{ 0, 255 },
/* old= r, write: 0, read:xxx, close: 0 */
{ 0, 255 },
/* old= r, write: 0, read:xxx, close:add */
{ 0, 255 },
/* old= r, write: 0, read:xxx, close:del */
{ 0, 255 },
/* old= r, write: 0, read:xxx, close:xxx */
{ 0, 255 },
/* old= r, write:add, read: 0, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= r, write:add, read: 0, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= r, write:add, read: 0, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= r, write:add, read: 0, close:xxx */
{ 0, 255 },
/* old= r, write:add, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= r, write:add, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= r, write:add, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= r, write:add, read:add, close:xxx */
{ 0, 255 },
/* old= r, write:add, read:del, close: 0 */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= r, write:add, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= r, write:add, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= r, write:add, read:del, close:xxx */
{ 0, 255 },
/* old= r, write:add, read:xxx, close: 0 */
{ 0, 255 },
/* old= r, write:add, read:xxx, close:add */
{ 0, 255 },
/* old= r, write:add, read:xxx, close:del */
{ 0, 255 },
/* old= r, write:add, read:xxx, close:xxx */
{ 0, 255 },
/* old= r, write:del, read: 0, close: 0 */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= r, write:del, read: 0, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= r, write:del, read: 0, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= r, write:del, read: 0, close:xxx */
{ 0, 255 },
/* old= r, write:del, read:add, close: 0 */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= r, write:del, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= r, write:del, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= r, write:del, read:add, close:xxx */
{ 0, 255 },
/* old= r, write:del, read:del, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_DEL },
/* old= r, write:del, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= r, write:del, read:del, close:del */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= r, write:del, read:del, close:xxx */
{ 0, 255 },
/* old= r, write:del, read:xxx, close: 0 */
{ 0, 255 },
/* old= r, write:del, read:xxx, close:add */
{ 0, 255 },
/* old= r, write:del, read:xxx, close:del */
{ 0, 255 },
/* old= r, write:del, read:xxx, close:xxx */
{ 0, 255 },
/* old= r, write:xxx, read: 0, close: 0 */
{ 0, 255 },
/* old= r, write:xxx, read: 0, close:add */
{ 0, 255 },
/* old= r, write:xxx, read: 0, close:del */
{ 0, 255 },
/* old= r, write:xxx, read: 0, close:xxx */
{ 0, 255 },
/* old= r, write:xxx, read:add, close: 0 */
{ 0, 255 },
/* old= r, write:xxx, read:add, close:add */
{ 0, 255 },
/* old= r, write:xxx, read:add, close:del */
{ 0, 255 },
/* old= r, write:xxx, read:add, close:xxx */
{ 0, 255 },
/* old= r, write:xxx, read:del, close: 0 */
{ 0, 255 },
/* old= r, write:xxx, read:del, close:add */
{ 0, 255 },
/* old= r, write:xxx, read:del, close:del */
{ 0, 255 },
/* old= r, write:xxx, read:del, close:xxx */
{ 0, 255 },
/* old= r, write:xxx, read:xxx, close: 0 */
{ 0, 255 },
/* old= r, write:xxx, read:xxx, close:add */
{ 0, 255 },
/* old= r, write:xxx, read:xxx, close:del */
{ 0, 255 },
/* old= r, write:xxx, read:xxx, close:xxx */
{ 0, 255 },
/* old= w, write: 0, read: 0, close: 0 */
{ 0, 0 },
/* old= w, write: 0, read: 0, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= w, write: 0, read: 0, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write: 0, read: 0, close:xxx */
{ 0, 255 },
/* old= w, write: 0, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write: 0, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= w, write: 0, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write: 0, read:add, close:xxx */
{ 0, 255 },
/* old= w, write: 0, read:del, close: 0 */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write: 0, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= w, write: 0, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write: 0, read:del, close:xxx */
{ 0, 255 },
/* old= w, write: 0, read:xxx, close: 0 */
{ 0, 255 },
/* old= w, write: 0, read:xxx, close:add */
{ 0, 255 },
/* old= w, write: 0, read:xxx, close:del */
{ 0, 255 },
/* old= w, write: 0, read:xxx, close:xxx */
{ 0, 255 },
/* old= w, write:add, read: 0, close: 0 */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write:add, read: 0, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= w, write:add, read: 0, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write:add, read: 0, close:xxx */
{ 0, 255 },
/* old= w, write:add, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write:add, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= w, write:add, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write:add, read:add, close:xxx */
{ 0, 255 },
/* old= w, write:add, read:del, close: 0 */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write:add, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= w, write:add, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= w, write:add, read:del, close:xxx */
{ 0, 255 },
/* old= w, write:add, read:xxx, close: 0 */
{ 0, 255 },
/* old= w, write:add, read:xxx, close:add */
{ 0, 255 },
/* old= w, write:add, read:xxx, close:del */
{ 0, 255 },
/* old= w, write:add, read:xxx, close:xxx */
{ 0, 255 },
/* old= w, write:del, read: 0, close: 0 */
{ EPOLLOUT, EPOLL_CTL_DEL },
/* old= w, write:del, read: 0, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= w, write:del, read: 0, close:del */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= w, write:del, read: 0, close:xxx */
{ 0, 255 },
/* old= w, write:del, read:add, close: 0 */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= w, write:del, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= w, write:del, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= w, write:del, read:add, close:xxx */
{ 0, 255 },
/* old= w, write:del, read:del, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_DEL },
/* old= w, write:del, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= w, write:del, read:del, close:del */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= w, write:del, read:del, close:xxx */
{ 0, 255 },
/* old= w, write:del, read:xxx, close: 0 */
{ 0, 255 },
/* old= w, write:del, read:xxx, close:add */
{ 0, 255 },
/* old= w, write:del, read:xxx, close:del */
{ 0, 255 },
/* old= w, write:del, read:xxx, close:xxx */
{ 0, 255 },
/* old= w, write:xxx, read: 0, close: 0 */
{ 0, 255 },
/* old= w, write:xxx, read: 0, close:add */
{ 0, 255 },
/* old= w, write:xxx, read: 0, close:del */
{ 0, 255 },
/* old= w, write:xxx, read: 0, close:xxx */
{ 0, 255 },
/* old= w, write:xxx, read:add, close: 0 */
{ 0, 255 },
/* old= w, write:xxx, read:add, close:add */
{ 0, 255 },
/* old= w, write:xxx, read:add, close:del */
{ 0, 255 },
/* old= w, write:xxx, read:add, close:xxx */
{ 0, 255 },
/* old= w, write:xxx, read:del, close: 0 */
{ 0, 255 },
/* old= w, write:xxx, read:del, close:add */
{ 0, 255 },
/* old= w, write:xxx, read:del, close:del */
{ 0, 255 },
/* old= w, write:xxx, read:del, close:xxx */
{ 0, 255 },
/* old= w, write:xxx, read:xxx, close: 0 */
{ 0, 255 },
/* old= w, write:xxx, read:xxx, close:add */
{ 0, 255 },
/* old= w, write:xxx, read:xxx, close:del */
{ 0, 255 },
/* old= w, write:xxx, read:xxx, close:xxx */
{ 0, 255 },
/* old= rw, write: 0, read: 0, close: 0 */
{ 0, 0 },
/* old= rw, write: 0, read: 0, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= rw, write: 0, read: 0, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write: 0, read: 0, close:xxx */
{ 0, 255 },
/* old= rw, write: 0, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write: 0, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= rw, write: 0, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write: 0, read:add, close:xxx */
{ 0, 255 },
/* old= rw, write: 0, read:del, close: 0 */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write: 0, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= rw, write: 0, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write: 0, read:del, close:xxx */
{ 0, 255 },
/* old= rw, write: 0, read:xxx, close: 0 */
{ 0, 255 },
/* old= rw, write: 0, read:xxx, close:add */
{ 0, 255 },
/* old= rw, write: 0, read:xxx, close:del */
{ 0, 255 },
/* old= rw, write: 0, read:xxx, close:xxx */
{ 0, 255 },
/* old= rw, write:add, read: 0, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write:add, read: 0, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= rw, write:add, read: 0, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write:add, read: 0, close:xxx */
{ 0, 255 },
/* old= rw, write:add, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write:add, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= rw, write:add, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write:add, read:add, close:xxx */
{ 0, 255 },
/* old= rw, write:add, read:del, close: 0 */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write:add, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= rw, write:add, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= rw, write:add, read:del, close:xxx */
{ 0, 255 },
/* old= rw, write:add, read:xxx, close: 0 */
{ 0, 255 },
/* old= rw, write:add, read:xxx, close:add */
{ 0, 255 },
/* old= rw, write:add, read:xxx, close:del */
{ 0, 255 },
/* old= rw, write:add, read:xxx, close:xxx */
{ 0, 255 },
/* old= rw, write:del, read: 0, close: 0 */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= rw, write:del, read: 0, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= rw, write:del, read: 0, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= rw, write:del, read: 0, close:xxx */
{ 0, 255 },
/* old= rw, write:del, read:add, close: 0 */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= rw, write:del, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= rw, write:del, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= rw, write:del, read:add, close:xxx */
{ 0, 255 },
/* old= rw, write:del, read:del, close: 0 */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_DEL },
/* old= rw, write:del, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= rw, write:del, read:del, close:del */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= rw, write:del, read:del, close:xxx */
{ 0, 255 },
/* old= rw, write:del, read:xxx, close: 0 */
{ 0, 255 },
/* old= rw, write:del, read:xxx, close:add */
{ 0, 255 },
/* old= rw, write:del, read:xxx, close:del */
{ 0, 255 },
/* old= rw, write:del, read:xxx, close:xxx */
{ 0, 255 },
/* old= rw, write:xxx, read: 0, close: 0 */
{ 0, 255 },
/* old= rw, write:xxx, read: 0, close:add */
{ 0, 255 },
/* old= rw, write:xxx, read: 0, close:del */
{ 0, 255 },
/* old= rw, write:xxx, read: 0, close:xxx */
{ 0, 255 },
/* old= rw, write:xxx, read:add, close: 0 */
{ 0, 255 },
/* old= rw, write:xxx, read:add, close:add */
{ 0, 255 },
/* old= rw, write:xxx, read:add, close:del */
{ 0, 255 },
/* old= rw, write:xxx, read:add, close:xxx */
{ 0, 255 },
/* old= rw, write:xxx, read:del, close: 0 */
{ 0, 255 },
/* old= rw, write:xxx, read:del, close:add */
{ 0, 255 },
/* old= rw, write:xxx, read:del, close:del */
{ 0, 255 },
/* old= rw, write:xxx, read:del, close:xxx */
{ 0, 255 },
/* old= rw, write:xxx, read:xxx, close: 0 */
{ 0, 255 },
/* old= rw, write:xxx, read:xxx, close:add */
{ 0, 255 },
/* old= rw, write:xxx, read:xxx, close:del */
{ 0, 255 },
/* old= rw, write:xxx, read:xxx, close:xxx */
{ 0, 255 },
/* old= c, write: 0, read: 0, close: 0 */
{ 0, 0 },
/* old= c, write: 0, read: 0, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write: 0, read: 0, close:del */
{ EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= c, write: 0, read: 0, close:xxx */
{ 0, 255 },
/* old= c, write: 0, read:add, close: 0 */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write: 0, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write: 0, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= c, write: 0, read:add, close:xxx */
{ 0, 255 },
/* old= c, write: 0, read:del, close: 0 */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write: 0, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write: 0, read:del, close:del */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= c, write: 0, read:del, close:xxx */
{ 0, 255 },
/* old= c, write: 0, read:xxx, close: 0 */
{ 0, 255 },
/* old= c, write: 0, read:xxx, close:add */
{ 0, 255 },
/* old= c, write: 0, read:xxx, close:del */
{ 0, 255 },
/* old= c, write: 0, read:xxx, close:xxx */
{ 0, 255 },
/* old= c, write:add, read: 0, close: 0 */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:add, read: 0, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:add, read: 0, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= c, write:add, read: 0, close:xxx */
{ 0, 255 },
/* old= c, write:add, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:add, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:add, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= c, write:add, read:add, close:xxx */
{ 0, 255 },
/* old= c, write:add, read:del, close: 0 */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:add, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:add, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= c, write:add, read:del, close:xxx */
{ 0, 255 },
/* old= c, write:add, read:xxx, close: 0 */
{ 0, 255 },
/* old= c, write:add, read:xxx, close:add */
{ 0, 255 },
/* old= c, write:add, read:xxx, close:del */
{ 0, 255 },
/* old= c, write:add, read:xxx, close:xxx */
{ 0, 255 },
/* old= c, write:del, read: 0, close: 0 */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:del, read: 0, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:del, read: 0, close:del */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= c, write:del, read: 0, close:xxx */
{ 0, 255 },
/* old= c, write:del, read:add, close: 0 */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:del, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:del, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= c, write:del, read:add, close:xxx */
{ 0, 255 },
/* old= c, write:del, read:del, close: 0 */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:del, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= c, write:del, read:del, close:del */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= c, write:del, read:del, close:xxx */
{ 0, 255 },
/* old= c, write:del, read:xxx, close: 0 */
{ 0, 255 },
/* old= c, write:del, read:xxx, close:add */
{ 0, 255 },
/* old= c, write:del, read:xxx, close:del */
{ 0, 255 },
/* old= c, write:del, read:xxx, close:xxx */
{ 0, 255 },
/* old= c, write:xxx, read: 0, close: 0 */
{ 0, 255 },
/* old= c, write:xxx, read: 0, close:add */
{ 0, 255 },
/* old= c, write:xxx, read: 0, close:del */
{ 0, 255 },
/* old= c, write:xxx, read: 0, close:xxx */
{ 0, 255 },
/* old= c, write:xxx, read:add, close: 0 */
{ 0, 255 },
/* old= c, write:xxx, read:add, close:add */
{ 0, 255 },
/* old= c, write:xxx, read:add, close:del */
{ 0, 255 },
/* old= c, write:xxx, read:add, close:xxx */
{ 0, 255 },
/* old= c, write:xxx, read:del, close: 0 */
{ 0, 255 },
/* old= c, write:xxx, read:del, close:add */
{ 0, 255 },
/* old= c, write:xxx, read:del, close:del */
{ 0, 255 },
/* old= c, write:xxx, read:del, close:xxx */
{ 0, 255 },
/* old= c, write:xxx, read:xxx, close: 0 */
{ 0, 255 },
/* old= c, write:xxx, read:xxx, close:add */
{ 0, 255 },
/* old= c, write:xxx, read:xxx, close:del */
{ 0, 255 },
/* old= c, write:xxx, read:xxx, close:xxx */
{ 0, 255 },
/* old= cr, write: 0, read: 0, close: 0 */
{ 0, 0 },
/* old= cr, write: 0, read: 0, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write: 0, read: 0, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= cr, write: 0, read: 0, close:xxx */
{ 0, 255 },
/* old= cr, write: 0, read:add, close: 0 */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write: 0, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write: 0, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= cr, write: 0, read:add, close:xxx */
{ 0, 255 },
/* old= cr, write: 0, read:del, close: 0 */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write: 0, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write: 0, read:del, close:del */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= cr, write: 0, read:del, close:xxx */
{ 0, 255 },
/* old= cr, write: 0, read:xxx, close: 0 */
{ 0, 255 },
/* old= cr, write: 0, read:xxx, close:add */
{ 0, 255 },
/* old= cr, write: 0, read:xxx, close:del */
{ 0, 255 },
/* old= cr, write: 0, read:xxx, close:xxx */
{ 0, 255 },
/* old= cr, write:add, read: 0, close: 0 */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:add, read: 0, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:add, read: 0, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= cr, write:add, read: 0, close:xxx */
{ 0, 255 },
/* old= cr, write:add, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:add, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:add, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= cr, write:add, read:add, close:xxx */
{ 0, 255 },
/* old= cr, write:add, read:del, close: 0 */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:add, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:add, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= cr, write:add, read:del, close:xxx */
{ 0, 255 },
/* old= cr, write:add, read:xxx, close: 0 */
{ 0, 255 },
/* old= cr, write:add, read:xxx, close:add */
{ 0, 255 },
/* old= cr, write:add, read:xxx, close:del */
{ 0, 255 },
/* old= cr, write:add, read:xxx, close:xxx */
{ 0, 255 },
/* old= cr, write:del, read: 0, close: 0 */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:del, read: 0, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:del, read: 0, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= cr, write:del, read: 0, close:xxx */
{ 0, 255 },
/* old= cr, write:del, read:add, close: 0 */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:del, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:del, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= cr, write:del, read:add, close:xxx */
{ 0, 255 },
/* old= cr, write:del, read:del, close: 0 */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:del, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cr, write:del, read:del, close:del */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= cr, write:del, read:del, close:xxx */
{ 0, 255 },
/* old= cr, write:del, read:xxx, close: 0 */
{ 0, 255 },
/* old= cr, write:del, read:xxx, close:add */
{ 0, 255 },
/* old= cr, write:del, read:xxx, close:del */
{ 0, 255 },
/* old= cr, write:del, read:xxx, close:xxx */
{ 0, 255 },
/* old= cr, write:xxx, read: 0, close: 0 */
{ 0, 255 },
/* old= cr, write:xxx, read: 0, close:add */
{ 0, 255 },
/* old= cr, write:xxx, read: 0, close:del */
{ 0, 255 },
/* old= cr, write:xxx, read: 0, close:xxx */
{ 0, 255 },
/* old= cr, write:xxx, read:add, close: 0 */
{ 0, 255 },
/* old= cr, write:xxx, read:add, close:add */
{ 0, 255 },
/* old= cr, write:xxx, read:add, close:del */
{ 0, 255 },
/* old= cr, write:xxx, read:add, close:xxx */
{ 0, 255 },
/* old= cr, write:xxx, read:del, close: 0 */
{ 0, 255 },
/* old= cr, write:xxx, read:del, close:add */
{ 0, 255 },
/* old= cr, write:xxx, read:del, close:del */
{ 0, 255 },
/* old= cr, write:xxx, read:del, close:xxx */
{ 0, 255 },
/* old= cr, write:xxx, read:xxx, close: 0 */
{ 0, 255 },
/* old= cr, write:xxx, read:xxx, close:add */
{ 0, 255 },
/* old= cr, write:xxx, read:xxx, close:del */
{ 0, 255 },
/* old= cr, write:xxx, read:xxx, close:xxx */
{ 0, 255 },
/* old= cw, write: 0, read: 0, close: 0 */
{ 0, 0 },
/* old= cw, write: 0, read: 0, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write: 0, read: 0, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= cw, write: 0, read: 0, close:xxx */
{ 0, 255 },
/* old= cw, write: 0, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write: 0, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write: 0, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= cw, write: 0, read:add, close:xxx */
{ 0, 255 },
/* old= cw, write: 0, read:del, close: 0 */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write: 0, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write: 0, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= cw, write: 0, read:del, close:xxx */
{ 0, 255 },
/* old= cw, write: 0, read:xxx, close: 0 */
{ 0, 255 },
/* old= cw, write: 0, read:xxx, close:add */
{ 0, 255 },
/* old= cw, write: 0, read:xxx, close:del */
{ 0, 255 },
/* old= cw, write: 0, read:xxx, close:xxx */
{ 0, 255 },
/* old= cw, write:add, read: 0, close: 0 */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:add, read: 0, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:add, read: 0, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= cw, write:add, read: 0, close:xxx */
{ 0, 255 },
/* old= cw, write:add, read:add, close: 0 */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:add, read:add, close:add */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:add, read:add, close:del */
{ EPOLLIN|EPOLLOUT, EPOLL_CTL_MOD },
/* old= cw, write:add, read:add, close:xxx */
{ 0, 255 },
/* old= cw, write:add, read:del, close: 0 */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:add, read:del, close:add */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:add, read:del, close:del */
{ EPOLLOUT, EPOLL_CTL_MOD },
/* old= cw, write:add, read:del, close:xxx */
{ 0, 255 },
/* old= cw, write:add, read:xxx, close: 0 */
{ 0, 255 },
/* old= cw, write:add, read:xxx, close:add */
{ 0, 255 },
/* old= cw, write:add, read:xxx, close:del */
{ 0, 255 },
/* old= cw, write:add, read:xxx, close:xxx */
{ 0, 255 },
/* old= cw, write:del, read: 0, close: 0 */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:del, read: 0, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:del, read: 0, close:del */
{ EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= cw, write:del, read: 0, close:xxx */
{ 0, 255 },
/* old= cw, write:del, read:add, close: 0 */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:del, read:add, close:add */
{ EPOLLIN|EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:del, read:add, close:del */
{ EPOLLIN, EPOLL_CTL_MOD },
/* old= cw, write:del, read:add, close:xxx */
{ 0, 255 },
/* old= cw, write:del, read:del, close: 0 */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:del, read:del, close:add */
{ EPOLLRDHUP, EPOLL_CTL_MOD },
/* old= cw, write:del, read:del, close:del */
{ EPOLLIN|EPOLLOUT|EPOLLRDHUP, EPOLL_CTL_DEL },
/* old= cw, write:del, read:del, close:xxx */
{ 0, 255 },
/* old= cw, write:del, read:xxx, close: 0 */
{ 0, 255 },
/* old= cw, write:del, read:xxx, close:add */
{ 0, 255 },
/* old= cw, write:del, read:xxx, close:del */