Lines Matching defs:ev
71 struct event *ev[N_EVENTS];
110 ev[0] = event_new(base, pair1[0], EV_WRITE, callback1, NULL);
111 ev[1] = event_new(base, pair1[1], EV_READ|EV_PERSIST, callback1, NULL);
112 ev[2] = event_new(base, pair2[0], EV_WRITE|EV_PERSIST, callback2, NULL);
113 ev[3] = event_new(base, pair2[1], EV_READ, callback2, NULL);
116 ev[4] = evtimer_new(base, callback1, NULL);
117 ev[5] = evtimer_new(base, callback1, NULL);
118 ev[6] = evtimer_new(base, callback1, NULL);
119 ev[7] = event_new(base, -1, EV_PERSIST, callback2, NULL);
120 ev[8] = event_new(base, -1, EV_PERSIST, callback2, NULL);
121 ev[9] = event_new(base, -1, EV_PERSIST, callback2, NULL);
124 ev[10] = event_new(base, -1, 0, callback1, NULL);
125 ev[11] = event_new(base, -1, 0, callback2, NULL);
128 ev[12] = evsignal_new(base, SIGINT, callback2, NULL);
130 event_add(ev[0], NULL);
131 event_add(ev[1], &tv_onesec);
132 event_add(ev[2], tv_onesec_common);
133 event_add(ev[3], tv_two5sec_common);
135 event_add(ev[4], tv_onesec_common);
136 event_add(ev[5], tv_onesec_common);
137 event_add(ev[6], &tv_onesec);
138 event_add(ev[7], tv_two5sec_common);
139 event_add(ev[8], tv_onesec_common);
140 event_add(ev[9], &tv_two5sec);
142 event_active(ev[10], EV_READ, 1);
143 event_active(ev[11], EV_READ|EV_WRITE|EV_TIMEOUT, 1);
144 event_active(ev[1], EV_READ, 1);
146 event_add(ev[12], NULL);
152 printf(" %p [fd %ld] Write\n",ev[0],(long)pair1[0]);
153 printf(" %p [fd %ld] Read Persist Timeout=T+1\n",ev[1],(long)pair1[1]);
154 printf(" %p [fd %ld] Write Persist Timeout=T+1\n",ev[2],(long)pair2[0]);
155 printf(" %p [fd %ld] Read Timeout=T+2.5\n",ev[3],(long)pair2[1]);
156 printf(" %p [fd -1] Timeout=T+1\n",ev[4]);
157 printf(" %p [fd -1] Timeout=T+1\n",ev[5]);
158 printf(" %p [fd -1] Timeout=T+1\n",ev[6]);
159 printf(" %p [fd -1] Persist Timeout=T+2.5\n",ev[7]);
160 printf(" %p [fd -1] Persist Timeout=T+1\n",ev[8]);
161 printf(" %p [fd -1] Persist Timeout=T+2.5\n",ev[9]);
162 printf(" %p [sig %d] Signal Persist\n", ev[12], (int)SIGINT);
165 printf(" %p [fd -1, priority=0] Read active\n", ev[10]);
166 printf(" %p [fd -1, priority=0] Read Write Timeout active\n", ev[11]);
167 printf(" %p [fd %ld, priority=0] Read active\n", ev[1], (long)pair1[1]);
173 event_free(ev[i]);