aboutsummaryrefslogtreecommitdiffstats
path: root/cont.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-20 23:48:03 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-20 23:48:03 +0000
commit911f204050e38f547e57dfe7ab51bc6d7e05ae25 (patch)
treeefd793cb8bd34efc6550d33ca08e5d897da3b032 /cont.c
parent793e59eb889966762bf07f6f63c71d3be2c4ae5d (diff)
downloadruby-911f204050e38f547e57dfe7ab51bc6d7e05ae25.tar.gz
cont.c (struct rb_fiber_struct): bitfields for trasnferred and status
On 32-bit x86, this reduces the struct from 836 to 832 bytes and brings us down to 13 (64-byte) cachelines (from 14). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'cont.c')
-rw-r--r--cont.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cont.c b/cont.c
index e7ad79f99c..f1d5bc8dc3 100644
--- a/cont.c
+++ b/cont.c
@@ -175,12 +175,12 @@ struct rb_fiber_struct {
rb_context_t cont;
VALUE first_proc;
struct rb_fiber_struct *prev;
- enum fiber_status status;
+ BITFIELD(enum fiber_status status) : 2;
/* If a fiber invokes "transfer",
* then this fiber can't "resume" any more after that.
* You shouldn't mix "transfer" and "resume".
*/
- int transferred;
+ unsigned int transferred : 1;
#if FIBER_USE_NATIVE
#ifdef _WIN32