summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-15 05:54:41 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-15 05:54:41 +0000
commit727a2d55a30e6a2c3fec99eee19ced9301e8a958 (patch)
tree38ba08e6dc4e9c2a6943e8dacbce63672d1c50f0 /thread.c
parent906ad1670a2c589c271953b08b963440d35bac9f (diff)
vm_core.h (rb_thread_t): pack small fields together
On a 64-bit system, this reduces rb_thread_t from 536 to 520 bytes. Depending on the allocation, this can reduce cacheline access for checking the abort_on_exception, report_on_exception and pending_interrupt_queue_checked flags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread.c')
-rw-r--r--thread.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/thread.c b/thread.c
index 9c7fcee05f..90cb1c226e 100644
--- a/thread.c
+++ b/thread.c
@@ -3608,7 +3608,7 @@ rb_thread_priority_set(VALUE thread, VALUE prio)
else if (priority < RUBY_THREAD_PRIORITY_MIN) {
priority = RUBY_THREAD_PRIORITY_MIN;
}
- target_th->priority = priority;
+ target_th->priority = (int8_t)priority;
#endif
return INT2NUM(target_th->priority);
}