Project

General

Profile

« Previous | Next » 

Revision 774420eb

Added by Eric Wong about 8 years ago

reduce rb_mutex_t size from 80 bytes to 72 bytes on 64-bit

We can use existing RVALUE flags to avoid adding a 4-byte
integer to store a boolean flag. This integer cost us 8 bytes
due to default (lack of) struct packing on x86-64

  • thread_sync.c (MUTEX_ALLOW_TRAP): define as FL_USER1
    (struct rb_mutex_struct): remove allow_trap
    (rb_mutex_lock): adjust for flag check
    (rb_mutex_allow_trap): adjust for flag set/unset

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e