diff options
Diffstat (limited to 'src/nvim/ui_bridge.h')
-rw-r--r-- | src/nvim/ui_bridge.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/nvim/ui_bridge.h b/src/nvim/ui_bridge.h index 31b9a69216..dba461550f 100644 --- a/src/nvim/ui_bridge.h +++ b/src/nvim/ui_bridge.h @@ -1,4 +1,5 @@ -// Bridge used for communication between a builtin UI thread and nvim core +// Bridge for communication between a UI thread and nvim core. +// Used by the built-in TUI and libnvim-based UIs. #ifndef NVIM_UI_BRIDGE_H #define NVIM_UI_BRIDGE_H @@ -11,7 +12,7 @@ typedef struct ui_bridge_data UIBridgeData; typedef void(*ui_main_fn)(UIBridgeData *bridge, UI *ui); struct ui_bridge_data { UI bridge; // actual UI passed to ui_attach - UI *ui; // UI pointer that will have it's callback called in + UI *ui; // UI pointer that will have its callback called in // another thread event_scheduler scheduler; uv_thread_t ui_thread; @@ -28,13 +29,13 @@ struct ui_bridge_data { bool stopped; }; -#define CONTINUE(b) \ - do { \ - UIBridgeData *d = (UIBridgeData *)b; \ - uv_mutex_lock(&d->mutex); \ - d->ready = true; \ - uv_cond_signal(&d->cond); \ - uv_mutex_unlock(&d->mutex); \ +#define CONTINUE(b) \ + do { \ + UIBridgeData *d = (UIBridgeData *)b; \ + uv_mutex_lock(&d->mutex); \ + d->ready = true; \ + uv_cond_signal(&d->cond); \ + uv_mutex_unlock(&d->mutex); \ } while (0) |