diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-28 18:39:45 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-28 18:39:45 +0000 |
commit | cbb79f0472c4d5fa663033a46c34c6102cbb0e23 (patch) | |
tree | f37bce7f6211ef61a5eb5ffe71b3fefeb84811fa /ChangeLog | |
parent | 4079a35447218918a2494b5d7242c9a80b540183 (diff) |
signal.c: avoid repeated disable/enable interrupt
We only install system-level signal handlers during init (before any
threads or user code is running), so there's no need to repeatedly
enable/disable the interrupts at that time. We also do not change
system-level sig handlers once user-level code is running.
This saves about 20 syscalls at startup and makes the executable
smaller (numbers from 32-bit x86):
text data bss dec hex filename
before: 2815726 12100 30552 2858378 2b9d8a ruby
after: 2815022 12100 30552 2857674 2b9aca ruby
* signal.c (install_sighandler): remove rb_disable_interrupt and
rb_enable_interrupt calls
(init_sigchld): ditto
(Init_signal): disable and enable interrupt once around all
install_sighandler and init_sigchld to reduce syscalls at start
[Feature #9345] [ruby-core:59480]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ChangeLog')
-rw-r--r-- | ChangeLog | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -1,3 +1,12 @@ +Tue Oct 28 16:52:07 2014 Eric Wong <e@80x24.org> + + * signal.c (install_sighandler): remove rb_disable_interrupt and + rb_enable_interrupt calls + (init_sigchld): ditto + (Init_signal): disable and enable interrupt once around all + install_sighandler and init_sigchld to reduce syscalls at start + [Feature #9345] [ruby-core:59480] + Tue Oct 28 16:22:41 2014 Nobuyoshi Nakada <nobu@ruby-lang.org> * ruby.c (process_options, load_file_internal2): should not |