mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Use atomic load for signal buff size
This commit is contained in:
parent
05e0e7223a
commit
e7f97eb2f3
Notes:
git
2025-05-20 17:00:20 +00:00
2 changed files with 2 additions and 3 deletions
|
@ -22,7 +22,6 @@ race_top:push_subclass_entry_to_list
|
||||||
race:objspace_malloc_increase_body
|
race:objspace_malloc_increase_body
|
||||||
|
|
||||||
# Signals and ubf
|
# Signals and ubf
|
||||||
race_top:rb_signal_buff_size
|
|
||||||
race:unregister_ubf_list
|
race:unregister_ubf_list
|
||||||
|
|
||||||
# It's already crashing. We're doing our best
|
# It's already crashing. We're doing our best
|
||||||
|
|
4
signal.c
4
signal.c
|
@ -710,7 +710,7 @@ sighandler(int sig)
|
||||||
int
|
int
|
||||||
rb_signal_buff_size(void)
|
rb_signal_buff_size(void)
|
||||||
{
|
{
|
||||||
return signal_buff.size;
|
return RUBY_ATOMIC_LOAD(signal_buff.size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -738,7 +738,7 @@ rb_get_next_signal(void)
|
||||||
{
|
{
|
||||||
int i, sig = 0;
|
int i, sig = 0;
|
||||||
|
|
||||||
if (signal_buff.size != 0) {
|
if (rb_signal_buff_size() != 0) {
|
||||||
for (i=1; i<RUBY_NSIG; i++) {
|
for (i=1; i<RUBY_NSIG; i++) {
|
||||||
if (signal_buff.cnt[i] > 0) {
|
if (signal_buff.cnt[i] > 0) {
|
||||||
ATOMIC_DEC(signal_buff.cnt[i]);
|
ATOMIC_DEC(signal_buff.cnt[i]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue