summaryrefslogtreecommitdiff
path: root/common.mk
diff options
context:
space:
mode:
authorKoichi Sasada <ko1@atdot.net>2020-10-13 13:16:08 +0900
committerKoichi Sasada <ko1@atdot.net>2020-10-14 14:02:06 +0900
commit11c2f0f36ccc50899a8dd69a260e85451f68b5ba (patch)
tree4d968f2742fb0cb4d260c1f2c6b2695184e21d9e /common.mk
parentc3ba3fa8d01aa3970dc1f4e3dc0090ae171e9e35 (diff)
sync enc_table and rb_encoding_list
enc_table which manages Encoding information. rb_encoding_list also manages Encoding objects. Both are accessed/modified by ractors simultaneously so that they should be synchronized. For enc_table, this patch introduced GLOBAL_ENC_TABLE_ENTER/LEAVE/EVAL to access this table with VM lock. To make shortcut, three new global variables global_enc_ascii, global_enc_utf_8, global_enc_us_ascii are also introduced. For rb_encoding_list, we split it to rb_default_encoding_list (256 entries) and rb_additional_encoding_list. rb_default_encoding_list is fixed sized Array so we don't need to synchronized (and most of apps only needs it). To manage 257 or more encoding objects, they are stored into rb_additional_encoding_list. To access rb_additional_encoding_list., VM lock is needed.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/3654
Diffstat (limited to 'common.mk')
-rw-r--r--common.mk4
1 files changed, 4 insertions, 0 deletions
diff --git a/common.mk b/common.mk
index 509f09c1fe..e7b8f53a7f 100644
--- a/common.mk
+++ b/common.mk
@@ -4617,13 +4617,17 @@ encoding.$(OBJEXT): {$(VPATH)}internal/variable.h
encoding.$(OBJEXT): {$(VPATH)}internal/warning_push.h
encoding.$(OBJEXT): {$(VPATH)}internal/xmalloc.h
encoding.$(OBJEXT): {$(VPATH)}missing.h
+encoding.$(OBJEXT): {$(VPATH)}node.h
encoding.$(OBJEXT): {$(VPATH)}onigmo.h
encoding.$(OBJEXT): {$(VPATH)}oniguruma.h
+encoding.$(OBJEXT): {$(VPATH)}ractor_pub.h
encoding.$(OBJEXT): {$(VPATH)}regenc.h
encoding.$(OBJEXT): {$(VPATH)}ruby_assert.h
encoding.$(OBJEXT): {$(VPATH)}st.h
encoding.$(OBJEXT): {$(VPATH)}subst.h
encoding.$(OBJEXT): {$(VPATH)}util.h
+encoding.$(OBJEXT): {$(VPATH)}vm_debug.h
+encoding.$(OBJEXT): {$(VPATH)}vm_sync.h
enum.$(OBJEXT): $(hdrdir)/ruby.h
enum.$(OBJEXT): $(hdrdir)/ruby/ruby.h
enum.$(OBJEXT): $(top_srcdir)/internal/array.h