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

ruby-changes:42964

From: nobu <ko1@a...>
Date: Wed, 18 May 2016 02:24:38 +0900 (JST)
Subject: [ruby-changes:42964] nobu:r55038 (trunk): vm_core.h: bit flags

nobu	2016-05-18 02:24:34 +0900 (Wed, 18 May 2016)

  New Revision: 55038

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

  Log:
    vm_core.h: bit flags
    
    * vm_core.h (rb_vm_struct, rb_thread_struct): make flags bit
      fields.

  Modified files:
    trunk/vm_core.h
Index: vm_core.h
===================================================================
--- vm_core.h	(revision 55037)
+++ vm_core.h	(revision 55038)
@@ -493,9 +493,9 @@ typedef struct rb_vm_struct { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L493
     size_t living_thread_num;
     VALUE thgroup_default;
 
-    int running;
-    int thread_abort_on_exception;
-    int trace_running;
+    unsigned int running: 1;
+    unsigned int thread_abort_on_exception: 1;
+    unsigned int trace_running: 1;
     volatile int sleeper;
 
     /* object management */
@@ -784,8 +784,8 @@ typedef struct rb_thread_struct { https://github.com/ruby/ruby/blob/trunk/vm_core.h#L784
     rb_ensure_list_t *ensure_list;
 
     /* misc */
-    enum method_missing_reason method_missing_reason;
-    int abort_on_exception;
+    enum method_missing_reason method_missing_reason: 8;
+    unsigned int abort_on_exception: 1;
 #ifdef USE_SIGALTSTACK
     void *altstack;
 #endif

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

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