mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix typos in comments (sample/test/event-internal.h)
This commit is contained in:
parent
101fbe3100
commit
9c151f3c34
@ -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.
|
||||
*/
|
||||
#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.*/
|
||||
#define EVENT_DEL_EVEN_IF_FINALIZING 3
|
||||
int event_del_nolock_(struct event *ev, int blocking);
|
||||
|
@ -129,10 +129,10 @@ main(int argc, char **argv)
|
||||
|
||||
fprintf(stderr, "Write data to %s\n", fifo);
|
||||
#endif
|
||||
/* Initalize the event library */
|
||||
/* Initialize the event library */
|
||||
base = event_base_new();
|
||||
|
||||
/* Initalize one event */
|
||||
/* Initialize one event */
|
||||
#ifdef _WIN32
|
||||
evfifo = event_new(base, (evutil_socket_t)socket, EV_READ|EV_PERSIST, fifo_read,
|
||||
event_self_cbarg());
|
||||
|
@ -56,14 +56,14 @@ main(int argc, char **argv)
|
||||
(void) WSAStartup(wVersionRequested, &wsaData);
|
||||
#endif
|
||||
|
||||
/* Initalize the event library */
|
||||
/* Initialize the event library */
|
||||
base = event_base_new();
|
||||
if (!base) {
|
||||
ret = 1;
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Initalize one event */
|
||||
/* Initialize one event */
|
||||
signal_int = evsignal_new(base, SIGINT, signal_cb, event_self_cbarg());
|
||||
if (!signal_int) {
|
||||
ret = 2;
|
||||
|
@ -88,10 +88,10 @@ main(int argc, char **argv)
|
||||
flags = 0;
|
||||
}
|
||||
|
||||
/* Initalize the event library */
|
||||
/* Initialize the event library */
|
||||
base = event_base_new();
|
||||
|
||||
/* Initalize one event */
|
||||
/* Initialize one event */
|
||||
event_assign(&timeout, base, -1, flags, timeout_cb, (void*) &timeout);
|
||||
|
||||
evutil_timerclear(&tv);
|
||||
|
@ -102,7 +102,7 @@ test_edgetriggered(void *data_)
|
||||
"support edge-triggering", event_base_get_method(base),
|
||||
supports_et?"":"not "));
|
||||
|
||||
/* Initalize one event */
|
||||
/* Initialize one event */
|
||||
ev = event_new(base, pair[1], EV_READ|EV_ET|EV_PERSIST, read_cb, &ev);
|
||||
tt_assert(ev != NULL);
|
||||
tt_int_op(event_add(ev, NULL), ==, 0);
|
||||
|
@ -182,11 +182,11 @@ main(int argc, char **argv)
|
||||
if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
|
||||
return (1);
|
||||
|
||||
/* Initalize the event library */
|
||||
/* Initialize the event library */
|
||||
if (!(base = event_base_new()))
|
||||
return (1);
|
||||
|
||||
/* Initalize a timeout to terminate the test */
|
||||
/* Initialize a timeout to terminate the test */
|
||||
timeout = evtimer_new(base,timeout_cb,&timeout);
|
||||
/* and watch for writability on one end of the pipe */
|
||||
ev = event_new(base,pair[1],EV_WRITE | EV_PERSIST, write_cb, &ev);
|
||||
|
@ -102,10 +102,10 @@ main(int argc, char **argv)
|
||||
return (1);
|
||||
shutdown(pair[0], EVUTIL_SHUT_WR);
|
||||
|
||||
/* Initalize the event library */
|
||||
/* Initialize the event library */
|
||||
event_init();
|
||||
|
||||
/* Initalize one event */
|
||||
/* Initialize one event */
|
||||
event_set(&ev, pair[1], EV_READ | EV_TIMEOUT, read_cb, &ev);
|
||||
|
||||
event_add(&ev, &timeout);
|
||||
|
@ -57,7 +57,7 @@ main(int argc, char **argv)
|
||||
(void) WSAStartup(wVersionRequested, &wsaData);
|
||||
#endif
|
||||
|
||||
/* Initalize the event library */
|
||||
/* Initialize the event library */
|
||||
event_init();
|
||||
|
||||
return (0);
|
||||
|
@ -94,13 +94,13 @@ main(int argc, char **argv)
|
||||
|
||||
evutil_weakrand_seed_(&weakrand_state, 0);
|
||||
|
||||
/* Initalize the event library */
|
||||
/* Initialize the event library */
|
||||
event_init();
|
||||
|
||||
for (i = 0; i < NEVENT; i++) {
|
||||
ev[i] = malloc(sizeof(struct event));
|
||||
|
||||
/* Initalize one event */
|
||||
/* Initialize one event */
|
||||
evtimer_set(ev[i], time_cb, ev[i]);
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_usec = rand_int(50000);
|
||||
|
@ -99,10 +99,10 @@ main(int argc, char **argv)
|
||||
if (evutil_socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
|
||||
return (1);
|
||||
|
||||
/* Initalize the event library */
|
||||
/* Initialize the event library */
|
||||
event_init();
|
||||
|
||||
/* Initalize one event */
|
||||
/* Initialize one event */
|
||||
event_set(&ev, pair[1], EV_WRITE, write_cb, &ev);
|
||||
|
||||
event_add(&ev, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user