Fix typos in comments (sample/test/event-internal.h)

This commit is contained in:
dota17 2019-08-06 18:19:15 +08:00 committed by Azat Khuzhin
parent 101fbe3100
commit 9c151f3c34
No known key found for this signature in database
GPG Key ID: B86086848EF8686D
10 changed files with 17 additions and 17 deletions

View File

@ -467,7 +467,7 @@ int event_add_nolock_(struct event *ev,
* if it is running in another thread and it doesn't have EV_FINALIZE set. * if it is running in another thread and it doesn't have EV_FINALIZE set.
*/ */
#define EVENT_DEL_AUTOBLOCK 2 #define EVENT_DEL_AUTOBLOCK 2
/** Argument for event_del_nolock_. Tells event_del to procede even if the /** Argument for event_del_nolock_. Tells event_del to proceed even if the
* event is set up for finalization rather for regular use.*/ * event is set up for finalization rather for regular use.*/
#define EVENT_DEL_EVEN_IF_FINALIZING 3 #define EVENT_DEL_EVEN_IF_FINALIZING 3
int event_del_nolock_(struct event *ev, int blocking); int event_del_nolock_(struct event *ev, int blocking);

View File

@ -129,10 +129,10 @@ main(int argc, char **argv)
fprintf(stderr, "Write data to %s\n", fifo); fprintf(stderr, "Write data to %s\n", fifo);
#endif #endif
/* Initalize the event library */ /* Initialize the event library */
base = event_base_new(); base = event_base_new();
/* Initalize one event */ /* Initialize one event */
#ifdef _WIN32 #ifdef _WIN32
evfifo = event_new(base, (evutil_socket_t)socket, EV_READ|EV_PERSIST, fifo_read, evfifo = event_new(base, (evutil_socket_t)socket, EV_READ|EV_PERSIST, fifo_read,
event_self_cbarg()); event_self_cbarg());

View File

@ -56,14 +56,14 @@ main(int argc, char **argv)
(void) WSAStartup(wVersionRequested, &wsaData); (void) WSAStartup(wVersionRequested, &wsaData);
#endif #endif
/* Initalize the event library */ /* Initialize the event library */
base = event_base_new(); base = event_base_new();
if (!base) { if (!base) {
ret = 1; ret = 1;
goto out; goto out;
} }
/* Initalize one event */ /* Initialize one event */
signal_int = evsignal_new(base, SIGINT, signal_cb, event_self_cbarg()); signal_int = evsignal_new(base, SIGINT, signal_cb, event_self_cbarg());
if (!signal_int) { if (!signal_int) {
ret = 2; ret = 2;

View File

@ -88,10 +88,10 @@ main(int argc, char **argv)
flags = 0; flags = 0;
} }
/* Initalize the event library */ /* Initialize the event library */
base = event_base_new(); base = event_base_new();
/* Initalize one event */ /* Initialize one event */
event_assign(&timeout, base, -1, flags, timeout_cb, (void*) &timeout); event_assign(&timeout, base, -1, flags, timeout_cb, (void*) &timeout);
evutil_timerclear(&tv); evutil_timerclear(&tv);

View File

@ -102,7 +102,7 @@ test_edgetriggered(void *data_)
"support edge-triggering", event_base_get_method(base), "support edge-triggering", event_base_get_method(base),
supports_et?"":"not ")); supports_et?"":"not "));
/* Initalize one event */ /* Initialize one event */
ev = event_new(base, pair[1], EV_READ|EV_ET|EV_PERSIST, read_cb, &ev); ev = event_new(base, pair[1], EV_READ|EV_ET|EV_PERSIST, read_cb, &ev);
tt_assert(ev != NULL); tt_assert(ev != NULL);
tt_int_op(event_add(ev, NULL), ==, 0); tt_int_op(event_add(ev, NULL), ==, 0);

View File

@ -182,11 +182,11 @@ main(int argc, char **argv)
if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
return (1); return (1);
/* Initalize the event library */ /* Initialize the event library */
if (!(base = event_base_new())) if (!(base = event_base_new()))
return (1); return (1);
/* Initalize a timeout to terminate the test */ /* Initialize a timeout to terminate the test */
timeout = evtimer_new(base,timeout_cb,&timeout); timeout = evtimer_new(base,timeout_cb,&timeout);
/* and watch for writability on one end of the pipe */ /* and watch for writability on one end of the pipe */
ev = event_new(base,pair[1],EV_WRITE | EV_PERSIST, write_cb, &ev); ev = event_new(base,pair[1],EV_WRITE | EV_PERSIST, write_cb, &ev);

View File

@ -102,10 +102,10 @@ main(int argc, char **argv)
return (1); return (1);
shutdown(pair[0], EVUTIL_SHUT_WR); shutdown(pair[0], EVUTIL_SHUT_WR);
/* Initalize the event library */ /* Initialize the event library */
event_init(); event_init();
/* Initalize one event */ /* Initialize one event */
event_set(&ev, pair[1], EV_READ | EV_TIMEOUT, read_cb, &ev); event_set(&ev, pair[1], EV_READ | EV_TIMEOUT, read_cb, &ev);
event_add(&ev, &timeout); event_add(&ev, &timeout);

View File

@ -57,7 +57,7 @@ main(int argc, char **argv)
(void) WSAStartup(wVersionRequested, &wsaData); (void) WSAStartup(wVersionRequested, &wsaData);
#endif #endif
/* Initalize the event library */ /* Initialize the event library */
event_init(); event_init();
return (0); return (0);

View File

@ -94,13 +94,13 @@ main(int argc, char **argv)
evutil_weakrand_seed_(&weakrand_state, 0); evutil_weakrand_seed_(&weakrand_state, 0);
/* Initalize the event library */ /* Initialize the event library */
event_init(); event_init();
for (i = 0; i < NEVENT; i++) { for (i = 0; i < NEVENT; i++) {
ev[i] = malloc(sizeof(struct event)); ev[i] = malloc(sizeof(struct event));
/* Initalize one event */ /* Initialize one event */
evtimer_set(ev[i], time_cb, ev[i]); evtimer_set(ev[i], time_cb, ev[i]);
tv.tv_sec = 0; tv.tv_sec = 0;
tv.tv_usec = rand_int(50000); tv.tv_usec = rand_int(50000);

View File

@ -99,10 +99,10 @@ main(int argc, char **argv)
if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
return (1); return (1);
/* Initalize the event library */ /* Initialize the event library */
event_init(); event_init();
/* Initalize one event */ /* Initialize one event */
event_set(&ev, pair[1], EV_WRITE, write_cb, &ev); event_set(&ev, pair[1], EV_WRITE, write_cb, &ev);
event_add(&ev, NULL); event_add(&ev, NULL);