diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-27 21:04:36 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-01-27 21:04:36 +0000 |
commit | 994950c2cf214ccab03f7b9141c29f73e78b1601 (patch) | |
tree | 5c777df90faa8eb4c63d8e0a96c9131c24bc203b /thread.c | |
parent | 7d0e06a94c6908ca40be983b0fcfdd242fc3a2fe (diff) | |
download | ruby-994950c2cf214ccab03f7b9141c29f73e78b1601.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |