File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 9696# include <mach/mach_port.h>
9797#endif
9898
99- #ifndef VM_CHECK_MODE
100- # define VM_CHECK_MODE RUBY_DEBUG
101- #endif
102-
103- // From ractor_core.h
104- #ifndef RACTOR_CHECK_MODE
105- # define RACTOR_CHECK_MODE (VM_CHECK_MODE || RUBY_DEBUG) && (SIZEOF_UINT64_T == SIZEOF_VALUE)
106- #endif
107-
10899#ifndef RUBY_DEBUG_LOG
109100# define RUBY_DEBUG_LOG (...)
110101#endif
@@ -691,10 +682,10 @@ typedef struct rb_objspace {
691682#define HEAP_PAGE_ALIGN_LOG 16
692683#endif
693684
694- #if RACTOR_CHECK_MODE || GC_DEBUG
685+ #if RB_GC_OBJ_HAS_SUFFIX || GC_DEBUG
695686struct rvalue_overhead {
696- # if RACTOR_CHECK_MODE
697- uint32_t _ractor_belonging_id ;
687+ # ifdef RB_GC_OBJ_HAS_SUFFIX
688+ struct rb_gc_obj_suffix suffix ;
698689# endif
699690# if GC_DEBUG
700691 const char * file ;
Original file line number Diff line number Diff line change 1010 * first introduced for [Feature #20470].
1111 */
1212#include "ruby/ruby.h"
13+ #include "ruby/assert.h"
1314
1415#include "ruby/thread_native.h"
1516
17+ #ifndef VM_CHECK_MODE
18+ # define VM_CHECK_MODE RUBY_DEBUG
19+ #endif
20+
21+ // From ractor_core.h
22+ #ifndef RACTOR_CHECK_MODE
23+ # define RACTOR_CHECK_MODE (VM_CHECK_MODE || RUBY_DEBUG) && (SIZEOF_UINT64_T == SIZEOF_VALUE)
24+ #endif
25+
26+ #if RACTOR_CHECK_MODE
27+ void rb_ractor_setup_belonging (VALUE obj );
28+
29+ struct rb_gc_obj_suffix {
30+ uint32_t _ractor_belonging_id ;
31+ };
32+
33+ # define RB_GC_OBJ_HAS_SUFFIX 1
34+ # define RB_GC_OBJ_SUFFIX_SIZE (sizeof(struct rb_gc_obj_suffix))
35+ #else
36+ # define RB_GC_OBJ_SUFFIX_SIZE 0
37+ #endif
38+
1639struct rb_gc_vm_context {
1740 rb_nativethread_lock_t lock ;
1841
You can’t perform that action at this time.
0 commit comments