aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/tui
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2016-09-29 17:09:37 +0200
committerJustin M. Keyes <justinkz@gmail.com>2016-10-02 00:24:49 +0200
commit6186df3562e33e92f04ed8c850204ceabc4746e1 (patch)
tree90cc5779b0ba395e1b07069573ddb836a7d9de1f /src/nvim/tui
parentc8b6ec2e6a8599203b4cff762f148f62464d9725 (diff)
downloadrneovim-6186df3562e33e92f04ed8c850204ceabc4746e1.tar.gz
rneovim-6186df3562e33e92f04ed8c850204ceabc4746e1.tar.bz2
rneovim-6186df3562e33e92f04ed8c850204ceabc4746e1.zip
event/multiqueue.c: Rename "queue" to "multiqueue".
`lib/queue.h` implements a basic queue. `event/queue.c` implements a specialized data structure on top of lib/queue.h; it is not a "normal" queue. Rename the specialized multi-level queue implemented in event/queue.c to "multiqueue", to avoid confusion when reading the code. Before this change one can eventually notice that "macros (uppercase symbols) are for the normal queue, lowercase operations are for the multi-level queue", but that is unnecessary friction for new developers (or existing developers just visiting this part of the codebase).
Diffstat (limited to 'src/nvim/tui')
-rw-r--r--src/nvim/tui/input.c2
-rw-r--r--src/nvim/tui/tui.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/tui/input.c b/src/nvim/tui/input.c
index 68ea00ee63..740716f0ef 100644
--- a/src/nvim/tui/input.c
+++ b/src/nvim/tui/input.c
@@ -340,7 +340,7 @@ static void read_cb(Stream *stream, RBuffer *buf, size_t c, void *data,
// ls *.md | xargs nvim
input->in_fd = 2;
stream_close(&input->read_stream, NULL, NULL);
- queue_put(input->loop->fast_events, restart_reading, 1, input);
+ multiqueue_put(input->loop->fast_events, restart_reading, 1, input);
} else {
loop_schedule(&main_loop, event_create(1, input_done_event, 0));
}
diff --git a/src/nvim/tui/tui.c b/src/nvim/tui/tui.c
index 6f90742928..de0f121b46 100644
--- a/src/nvim/tui/tui.c
+++ b/src/nvim/tui/tui.c
@@ -628,8 +628,8 @@ static void tui_suspend(UI *ui)
// kill(0, SIGTSTP) won't stop the UI thread, so we must poll for SIGCONT
// before continuing. This is done in another callback to avoid
// loop_poll_events recursion
- queue_put_event(data->loop->fast_events,
- event_create(1, suspend_event, 1, ui));
+ multiqueue_put_event(data->loop->fast_events,
+ event_create(1, suspend_event, 1, ui));
}
static void tui_set_title(UI *ui, char *title)