aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/event
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/event')
-rw-r--r--src/nvim/event/libuv_process.c2
-rw-r--r--src/nvim/event/loop.c10
-rw-r--r--src/nvim/event/rstream.c2
-rw-r--r--src/nvim/event/wstream.c4
4 files changed, 7 insertions, 11 deletions
diff --git a/src/nvim/event/libuv_process.c b/src/nvim/event/libuv_process.c
index a7966994e0..f77d686c10 100644
--- a/src/nvim/event/libuv_process.c
+++ b/src/nvim/event/libuv_process.c
@@ -90,7 +90,7 @@ int libuv_process_spawn(LibuvProcess *uvproc)
int status;
if ((status = uv_spawn(&proc->loop->uv, &uvproc->uv, &uvproc->uvopts))) {
- ELOG("uv_spawn(%s) failed: %s", uvproc->uvopts.file, uv_strerror(status));
+ ILOG("uv_spawn(%s) failed: %s", uvproc->uvopts.file, uv_strerror(status));
if (uvproc->uvopts.env) {
os_free_fullenv(uvproc->uvopts.env);
}
diff --git a/src/nvim/event/loop.c b/src/nvim/event/loop.c
index 93948d3eaa..e1ebcecbd6 100644
--- a/src/nvim/event/loop.c
+++ b/src/nvim/event/loop.c
@@ -39,10 +39,8 @@ void loop_init(Loop *loop, void *data)
/// @param ms 0: non-blocking poll.
/// > 0: timeout after `ms`.
/// < 0: wait forever.
-/// @param once true: process at most one `Loop.uv` event.
-/// false: process until `ms` timeout (only has effect if `ms` > 0).
/// @return true if `ms` > 0 and was reached
-bool loop_uv_run(Loop *loop, int64_t ms, bool once)
+static bool loop_uv_run(Loop *loop, int64_t ms)
{
if (loop->recursive++) {
abort(); // Should not re-enter uv_run
@@ -60,9 +58,7 @@ bool loop_uv_run(Loop *loop, int64_t ms, bool once)
mode = UV_RUN_NOWAIT;
}
- do {
- uv_run(&loop->uv, mode);
- } while (ms > 0 && !once && !*timeout_expired);
+ uv_run(&loop->uv, mode);
if (ms > 0) {
uv_timer_stop(&loop->poll_timer);
@@ -83,7 +79,7 @@ bool loop_uv_run(Loop *loop, int64_t ms, bool once)
/// @return true if `ms` > 0 and was reached
bool loop_poll_events(Loop *loop, int64_t ms)
{
- bool timeout_expired = loop_uv_run(loop, ms, true);
+ bool timeout_expired = loop_uv_run(loop, ms);
multiqueue_process_events(loop->fast_events);
return timeout_expired;
}
diff --git a/src/nvim/event/rstream.c b/src/nvim/event/rstream.c
index f50c8a0e5a..6b4ab472e4 100644
--- a/src/nvim/event/rstream.c
+++ b/src/nvim/event/rstream.c
@@ -106,7 +106,7 @@ static void read_cb(uv_stream_t *uvstream, ssize_t cnt, const uv_buf_t *buf)
// http://docs.libuv.org/en/latest/stream.html#c.uv_read_start.
//
// We don't need to do anything with the RBuffer because the next call
- // to `alloc_cb` will return the same unused pointer(`rbuffer_produced`
+ // to `alloc_cb` will return the same unused pointer (`rbuffer_produced`
// won't be called)
if (cnt == UV_ENOBUFS || cnt == 0) {
return;
diff --git a/src/nvim/event/wstream.c b/src/nvim/event/wstream.c
index 406ff1620d..c67a9b96ed 100644
--- a/src/nvim/event/wstream.c
+++ b/src/nvim/event/wstream.c
@@ -103,7 +103,7 @@ err:
/// Creates a WBuffer object for holding output data. Instances of this
/// object can be reused across Stream instances, and the memory is freed
-/// automatically when no longer needed(it tracks the number of references
+/// automatically when no longer needed (it tracks the number of references
/// internally)
///
/// @param data Data stored by the WBuffer
@@ -111,7 +111,7 @@ err:
/// @param refcount The number of references for the WBuffer. This will be used
/// by Stream instances to decide when a WBuffer should be freed.
/// @param cb Pointer to function that will be responsible for freeing
-/// the buffer data(passing 'free' will work as expected).
+/// the buffer data (passing `xfree` will work as expected).
/// @return The allocated WBuffer instance
WBuffer *wstream_new_buffer(char *data, size_t size, size_t refcount, wbuffer_data_finalizer cb)
FUNC_ATTR_NONNULL_ARG(1)