fish-shell/src
ridiculousfish 65e1c42a2b topic_monitor to use binary semaphore instead of self-pipe
With the prior commit, the topic_monitor only writes to the pipe if a
thread is known to be waiting. This is effectively a binary semaphore, and
on systems that support anon semaphores (yes Linux, but not Mac) we can use
them. These are more efficient than self-pipes.

We add a binary_semaphore_t class which uses sem_t if sem_init succeeds,
and a self-pipe if it fails.

On Linux the seq_echo benchmark (run 1024 times) goes from 12.40 seconds to
11.59 seconds, about an 11% improvement.
2020-08-20 14:58:18 -07:00
..
widecharwidth Incorporate widecharwidth changes for narrow emoji 2020-08-04 12:40:46 -07:00
ast.cpp Reflow comment 2020-08-04 21:44:59 +02:00
ast.h Allow newlines after && and || 2020-08-06 21:24:26 +02:00
ast_node_types.inc Introduce a new fish ast 2020-07-04 14:58:02 -07:00
autoload.cpp Don't eagerly fetch the current time in autoloading 2020-08-08 15:30:04 -07:00
autoload.h
builtin.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_argparse.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_argparse.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_bg.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_bg.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_bind.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_bind.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_block.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_block.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_builtin.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_builtin.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_cd.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_cd.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_command.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_command.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_commandline.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_commandline.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_complete.cpp Remove the cursor position from highlighting 2020-08-11 17:42:30 -07:00
builtin_complete.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_contains.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_contains.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_disown.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_disown.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_echo.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_echo.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_emit.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_emit.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_eval.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_eval.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_exit.cpp Rework exit command 2020-08-15 16:06:54 -07:00
builtin_exit.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_fg.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_fg.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_function.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_function.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_functions.cpp Remove the cursor position from highlighting 2020-08-11 17:42:30 -07:00
builtin_functions.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_history.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_history.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_jobs.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_jobs.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_math.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_math.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_printf.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_printf.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_pwd.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_pwd.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_random.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_random.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_read.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_read.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_realpath.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_realpath.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_return.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_return.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_set.cpp Return no status from successful variable assignments 2020-08-05 12:23:49 -07:00
builtin_set.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_set_color.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_set_color.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_source.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_source.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_status.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_status.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_string.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_string.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_test.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_test.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_ulimit.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_ulimit.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_wait.cpp Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
builtin_wait.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
color.cpp Another formatting run 2020-06-24 20:43:56 +02:00
color.h
common.cpp Bravely have read_blocked return after first read 2020-07-30 22:08:54 -07:00
common.h Eliminate wcs2str 2020-07-29 16:37:39 -07:00
complete.cpp complete.cpp: correct a comment 2020-08-13 16:03:15 +08:00
complete.h Introduce operation_context_t 2020-01-16 15:21:28 -08:00
enum_set.h [cppcheck] add some std::move 2020-03-14 15:07:54 -07:00
env.cpp Add a $status_generation variable that's incremented for each interactive command that produces a status. 2020-08-05 12:23:49 -07:00
env.h Convert var_table_t to an unordered_map 2020-06-25 00:56:49 -05:00
env_dispatch.cpp Eliminate the termsize handling from common.h 2020-06-07 20:00:42 -07:00
env_dispatch.h
env_universal_common.cpp Eliminate wcs2str 2020-07-29 16:37:39 -07:00
env_universal_common.h Continued adoption of autoclose_fd_t and exec_close 2020-01-29 14:16:16 -08:00
event.cpp Remove some dead code and enable a test 2020-08-09 15:05:16 -07:00
event.h [cppcheck] add some std::move 2020-03-14 15:07:54 -07:00
exec.cpp Return no status from successful variable assignments 2020-08-05 12:23:49 -07:00
exec.h Correct a misspeeling 2020-08-06 11:51:08 -07:00
expand.cpp Clean up expand_cmdsubst somewhat 2020-07-14 15:19:10 -07:00
expand.h [clang-tidy] remove redundant string initialization 2020-04-05 10:13:13 +02:00
fallback.cpp Remove lrand48 checks and support 2020-07-08 11:00:12 -07:00
fallback.h Remove lrand48 checks and support 2020-07-08 11:00:12 -07:00
fd_monitor.cpp [cppcheck] add const in several places 2020-03-14 15:07:54 -07:00
fd_monitor.h Include sys/select.h for fd_set 2020-02-12 22:02:32 +01:00
fish.cpp Rework exit command 2020-08-15 16:06:54 -07:00
fish_indent.cpp fish_indent: preserve semis in if and while conditions 2020-08-17 17:40:28 +02:00
fish_key_reader.cpp Exit key reader normally on help, version 2020-05-05 12:33:22 +08:00
fish_test_helper.cpp Add a test that nohup works 2020-08-10 12:26:30 -07:00
fish_tests.cpp Remove the cursor position from highlighting 2020-08-11 17:42:30 -07:00
fish_version.cpp
fish_version.h
flog.cpp Stop #include-ing wcstringutil.h in flog.h 2020-07-29 17:04:18 -07:00
flog.h Stop #include-ing wcstringutil.h in flog.h 2020-07-29 17:04:18 -07:00
function.cpp Adopt the new AST in parse_execution 2020-07-04 14:58:05 -07:00
function.h Remove the old parser bits 2020-07-04 14:58:05 -07:00
future_feature_flags.cpp Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
future_feature_flags.h
global_safety.h
highlight.cpp Remove the cursor position from highlighting 2020-08-11 17:42:30 -07:00
highlight.h Remove the cursor position from highlighting 2020-08-11 17:42:30 -07:00
history.cpp Reduce copying in parse_util_detect_errors 2020-07-12 16:57:30 -07:00
history.h Avoid forming owning_lock of incomplete type in history 2020-05-22 13:36:46 -07:00
history_file.cpp [clang-tidy] change several member functions to const 2020-04-05 10:13:13 +02:00
history_file.h [clang-tidy] change several member functions to const 2020-04-05 10:13:13 +02:00
input.cpp Remove a bunch of #ifdef'd out code 2020-08-09 15:06:50 -07:00
input.h [cppcheck] add const in several places 2020-03-14 15:07:54 -07:00
input_common.cpp [clang-tidy] performance 2020-04-05 10:13:13 +02:00
input_common.h Add forward-single-char input command 2020-08-01 12:09:31 +02:00
intern.cpp Remove a few less useful debug messages 2020-01-19 14:22:50 +01:00
intern.h
io.cpp Do not buffer builtin output if avoidable 2020-07-30 22:45:44 -07:00
io.h Support explicitly separated output on stderr 2020-07-30 23:00:34 -07:00
iothread.cpp Guard thread_local 2020-05-22 13:41:05 -07:00
iothread.h Introduce debounce_t 2020-03-06 17:15:21 -08:00
job_group.cpp Factor job groups into their own file 2020-07-19 16:42:29 -07:00
job_group.h Factor job groups into their own file 2020-07-19 16:42:29 -07:00
kill.cpp
kill.h
lru.h Use unordered_map instead of map in lru 2020-08-08 15:32:06 -07:00
maybe.h Change builtins to return maybe_t<int> instead of int 2020-08-05 12:23:49 -07:00
null_terminated_array.cpp Change C casts to C++ ones 2020-05-01 13:30:56 -07:00
null_terminated_array.h Change C casts to C++ ones 2020-05-01 13:30:56 -07:00
operation_context.cpp Introduce operation_context_t 2020-01-16 15:21:28 -08:00
operation_context.h Rename job_tree to job_group 2020-05-30 14:22:44 -07:00
output.cpp Remove some dead code and enable a test 2020-08-09 15:05:16 -07:00
output.h
pager.cpp Adopt termsize_t in the pager 2020-06-07 20:00:42 -07:00
pager.h Adopt termsize_t in the pager 2020-06-07 20:00:42 -07:00
parse_constants.h Make parse_token_type_t an enum class 2020-07-09 14:22:04 -07:00
parse_execution.cpp Rework exit command 2020-08-15 16:06:54 -07:00
parse_execution.h Correctly propagate signals from cancelled jobs into parse_execution_context 2020-08-13 15:30:15 -07:00
parse_tree.cpp Reduce copying in parse_util_detect_errors 2020-07-12 16:57:30 -07:00
parse_tree.h Reduce copying in parse_util_detect_errors 2020-07-12 16:57:30 -07:00
parse_util.cpp Remove some debugging code which was accidentally left in 2020-08-11 13:11:48 -07:00
parse_util.h Reduce copying in parse_util_detect_errors 2020-07-12 16:57:30 -07:00
parser.cpp Correctly propagate signals from cancelled jobs into parse_execution_context 2020-08-13 15:30:15 -07:00
parser.h Rework exit command 2020-08-15 16:06:54 -07:00
parser_keywords.cpp Simplify parser_keywords_is_reserved 2020-08-08 15:04:52 -07:00
parser_keywords.h
path.cpp Stop #include-ing wcstringutil.h in flog.h 2020-07-29 17:04:18 -07:00
path.h Migrate a bunch of code out of common.h 2020-01-15 13:16:43 -08:00
postfork.cpp Bravely remove reclaim... param from continue_job, and rework tcsetpgrp calls 2020-07-27 14:51:37 -07:00
postfork.h Bravely remove reclaim... param from continue_job, and rework tcsetpgrp calls 2020-07-27 14:51:37 -07:00
print_help.cpp
print_help.h
proc.cpp Prevent certain 100% CPU loops 2020-08-16 12:56:42 -07:00
proc.h Refactor process_mark_finished_children 2020-08-07 12:34:53 -07:00
reader.cpp Rework exit command 2020-08-15 16:06:54 -07:00
reader.h Rework exit command 2020-08-15 16:06:54 -07:00
redirection.cpp
redirection.h
sanity.cpp Change C casts to C++ ones 2020-05-01 13:30:56 -07:00
sanity.h
screen.cpp Cache resolved colors when outputting to the screen 2020-08-03 17:34:27 -07:00
screen.h Correct pager size when command line soft-wraps 2020-07-05 08:55:17 +02:00
signal.cpp Simplify topic monitoring 2020-08-06 19:01:30 -07:00
signal.h Simplify topic monitoring 2020-08-06 19:01:30 -07:00
termsize.cpp Stop #include-ing wcstringutil.h in flog.h 2020-07-29 17:04:18 -07:00
termsize.h Eliminate the termsize handling from common.h 2020-06-07 20:00:42 -07:00
timer.cpp [clang-tidy] performance 2020-04-05 10:13:13 +02:00
timer.h
tinyexpr.cpp Change C casts to C++ ones 2020-05-01 13:30:56 -07:00
tinyexpr.h math: Complain about unknown *function*, not *variable* 2020-02-07 17:43:22 +01:00
tokenizer.cpp Remove preceding_escaped_nl 2020-07-07 13:48:35 -07:00
tokenizer.h Remove preceding_escaped_nl 2020-07-07 13:48:35 -07:00
topic_monitor.cpp topic_monitor to use binary semaphore instead of self-pipe 2020-08-20 14:58:18 -07:00
topic_monitor.h topic_monitor to use binary semaphore instead of self-pipe 2020-08-20 14:58:18 -07:00
trace.cpp [cppcheck] add const in several places 2020-03-14 15:07:54 -07:00
trace.h
utf8.cpp Change C casts to C++ ones 2020-05-01 13:30:56 -07:00
utf8.h
util.cpp [clang-tidy] numeric literals to uppercase 2020-04-05 10:13:13 +02:00
util.h Return glob ordering to pre-3.1 state 2020-02-14 19:06:19 +01:00
wcstringutil.cpp Introduce wcs2string_callback 2020-07-29 19:36:20 -07:00
wcstringutil.h Introduce wcs2string_callback 2020-07-29 19:36:20 -07:00
wgetopt.cpp Remove some dead code and enable a test 2020-08-09 15:05:16 -07:00
wgetopt.h [clang-tidy] change several member functions to const 2020-04-05 10:13:13 +02:00
wildcard.cpp Apply clang-format 10 and selected lints from "make lint-all" 2020-07-01 00:44:06 +02:00
wildcard.h Correct the speeling of sentinel 2020-02-29 15:56:52 -08:00
wutil.cpp Remove some dead code and enable a test 2020-08-09 15:05:16 -07:00
wutil.h Remove some dead code and enable a test 2020-08-09 15:05:16 -07:00