diff options
author | erw7 <erw7.github@gmail.com> | 2022-07-04 19:28:59 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-04 03:28:59 -0700 |
commit | 436747752bf1016d93101de24e39e192a0b721b4 (patch) | |
tree | e7e469ec692af661eb1f0e050f9ec9d3775e9b22 /src/nvim/os/signal.c | |
parent | f075feee3258d15f6549e33c185f6165f9c7fbfc (diff) | |
download | rneovim-436747752bf1016d93101de24e39e192a0b721b4.tar.gz rneovim-436747752bf1016d93101de24e39e192a0b721b4.tar.bz2 rneovim-436747752bf1016d93101de24e39e192a0b721b4.zip |
refactor: remove unnecessary volatile #19210
libuv does not call callback functions(uv_signal_cb) directly from signal
handlers. Therefore, there is no need to use volatile.
Ref. https://github.com/libuv/libuv/blob/1a91b51976a1adc6972081faa78b6b70022254d3/src/unix/signal.c#L183
Diffstat (limited to 'src/nvim/os/signal.c')
-rw-r--r-- | src/nvim/os/signal.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nvim/os/signal.c b/src/nvim/os/signal.c index c6c43aac92..581f025a0f 100644 --- a/src/nvim/os/signal.c +++ b/src/nvim/os/signal.c @@ -165,8 +165,7 @@ static char *signal_name(int signum) // This function handles deadly signals. // It tries to preserve any swap files and exit properly. // (partly from Elvis). -// NOTE: Avoid unsafe functions, such as allocating memory, they can result in -// a deadlock. +// NOTE: this is scheduled on the event loop, not called directly from a signal handler. static void deadly_signal(int signum) FUNC_ATTR_NORETURN { |