summaryrefslogtreecommitdiff
path: root/thread.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-27 21:04:36 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-27 21:04:36 +0000
commit72b7bd0af5278e8ba726c7ee9464d19d3a9adc21 (patch)
tree5c777df90faa8eb4c63d8e0a96c9131c24bc203b /thread.c
parent6cb0126773cf2b3d4a753da5601a4a5165a78d04 (diff)
vm_core: use "int" for living_thread_num
We treat this as "int" through the vm_living_thread_num API anyways, and "pid_t" is still 32-bits with glibc on 64-bit platforms. I expect it'll be a long time before anybody needs more than 2 billion native threads. For now, let's save one cacheline on x86-64 (as reported by pahole(1)): before: size: 1288, cachelines: 21, members: 45 after: size: 1280, cachelines: 20, members: 45 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@62075 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 f50ad3de6a..acb53354fd 100644
--- a/thread.c
+++ b/thread.c
@@ -194,7 +194,7 @@ vm_check_ints_blocking(rb_execution_context_t *ec)
static int
vm_living_thread_num(rb_vm_t *vm)
{
- return (int)vm->living_thread_num;
+ return vm->living_thread_num;
}
#if THREAD_DEBUG