[前][次][番号順一覧][スレッド一覧]

ruby-changes:51228

From: normal <ko1@a...>
Date: Tue, 15 May 2018 19:11:36 +0900 (JST)
Subject: [ruby-changes:51228] normal:r63435 (trunk): vm_core.h (rb_execution_context_t): interrupt_mask size to match interrupt_flag

normal	2018-05-15 19:11:32 +0900 (Tue, 15 May 2018)

  New Revision: 63435

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63435

  Log:
    vm_core.h (rb_execution_context_t): interrupt_mask size to match interrupt_flag
    
    rb_atomic_t is 32-bit on 64-bit platforms (including the popular
    x86-64 Linux), so save 4 bytes on this structure.  This doesn't
    result in any final size reduction due to padding, yet, but
    future changes are possible to shrink rb_execution_context_t

  Modified files:
    trunk/vm_core.h
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 63434)
+++ vm_core.h	(revision 63435)
@@ -787,7 +787,7 @@ typedef struct rb_execution_context_stru https://github.com/ruby/ruby/blob/trunk/vm_core.h#L787
 
     /* interrupt flags */
     rb_atomic_t interrupt_flag;
-    unsigned long interrupt_mask;
+    rb_atomic_t interrupt_mask; /* size should match flag */
 
     rb_fiber_t *fiber_ptr;
     struct rb_thread_struct *thread_ptr;

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]