diff options
author | Koichi Sasada <ko1@atdot.net> | 2020-10-13 13:16:08 +0900 |
---|---|---|
committer | Koichi Sasada <ko1@atdot.net> | 2020-10-14 14:02:06 +0900 |
commit | 11c2f0f36ccc50899a8dd69a260e85451f68b5ba (patch) | |
tree | 4d968f2742fb0cb4d260c1f2c6b2695184e21d9e /common.mk | |
parent | c3ba3fa8d01aa3970dc1f4e3dc0090ae171e9e35 (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.mk | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |