Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 2 months ago
parent
commit
734a2acd09
3 changed files with 12 additions and 12 deletions
  1. +2
    -2
      ev.3
  2. +9
    -9
      ev.pod
  3. +1
    -1
      ev_iouring.c

+ 2
- 2
ev.3 View File

@@ -133,7 +133,7 @@
.\" ========================================================================
.\"
.IX Title "LIBEV 3"
.TH LIBEV 3 "2020-03-12" "libev-4.31" "libev - high performance full featured event loop"
.TH LIBEV 3 "2020-04-19" "libev-4.33" "libev - high performance full featured event loop"
.\" For nroff, turn off justification. Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
@@ -1534,7 +1534,7 @@ therefore a good idea to always call its \f(CW\*(C`ev_TYPE_stop\*(C'\fR function
.IX Item "bool ev_is_active (ev_TYPE *watcher)"
Returns a true value iff the watcher is active (i.e. it has been started
and not yet been stopped). As long as a watcher is active you must not modify
it.
it unless documented otherwise.
.IP "bool ev_is_pending (ev_TYPE *watcher)" 4
.IX Item "bool ev_is_pending (ev_TYPE *watcher)"
Returns a true value iff the watcher is pending, (i.e. it has outstanding


+ 9
- 9
ev.pod View File

@@ -3864,10 +3864,10 @@ event loop thread and an unspecified mechanism to wake up the main thread.
First, you need to associate some data with the event loop:

typedef struct {
mutex_t lock; /* global loop lock */
pthread_mutex_t lock; /* global loop lock */
pthread_t tid;
pthread_cond_t invoke_cv;
ev_async async_w;
thread_t tid;
cond_t invoke_cv;
} userdata;

void prepare_loop (EV_P)
@@ -3875,19 +3875,19 @@ First, you need to associate some data with the event loop:
// for simplicity, we use a static userdata struct.
static userdata u;

ev_async_init (&u->async_w, async_cb);
ev_async_start (EV_A_ &u->async_w);
ev_async_init (&u.async_w, async_cb);
ev_async_start (EV_A_ &u.async_w);

pthread_mutex_init (&u->lock, 0);
pthread_cond_init (&u->invoke_cv, 0);
pthread_mutex_init (&u.lock, 0);
pthread_cond_init (&u.invoke_cv, 0);

// now associate this with the loop
ev_set_userdata (EV_A_ u);
ev_set_userdata (EV_A_ &u);
ev_set_invoke_pending_cb (EV_A_ l_invoke);
ev_set_loop_release_cb (EV_A_ l_release, l_acquire);

// then create the thread running ev_run
pthread_create (&u->tid, 0, l_run, EV_A);
pthread_create (&u.tid, 0, l_run, EV_A);
}

The callback for the C<ev_async> watcher does nothing: the watcher is used


+ 1
- 1
ev_iouring.c View File

@@ -61,7 +61,7 @@
* applications, to the detriment of everybody else who just wants
* an event loop. but, umm, ok, if that's all, it could be worse.
* (from what I gather from the author Jens Axboe, it simply didn't
* occur to him, and he made good on it by adding an unlimited nuber
* occur to him, and he made good on it by adding an unlimited number
* of timeouts later :).
* h) initially there was a hardcoded limit of 4096 outstanding events.
* later versions not only bump this to 32k, but also can handle


Loading…
Cancel
Save