thread_pthread.h (native_thread_data): split list_node between ubf and gvl

Do not waste extra memory for each thread, but make
thread_pthread.c easier-to-follow as a result.

[ruby-core:88475] [Misc #14937]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
normal 2018-08-15 05:31:31 +00:00
parent 7815d7d713
commit 906ad1670a
2 changed files with 14 additions and 10 deletions

View file

@ -21,7 +21,10 @@
typedef pthread_cond_t rb_nativethread_cond_t;
typedef struct native_thread_data_struct {
struct list_node ubf_list;
union {
struct list_node ubf;
struct list_node gvl;
} node;
#if defined(__GLIBC__) || defined(__FreeBSD__)
union
#else