aboutsummaryrefslogtreecommitdiffstats
path: root/thread_pthread.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-15 05:31:31 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-08-15 05:31:31 +0000
commit906ad1670a2c589c271953b08b963440d35bac9f (patch)
treef21bd44a12ccbb8fcf99466480065b956acd34b5 /thread_pthread.h
parent7815d7d7135fd1b8de4b2b27472034e67645d96c (diff)
downloadruby-906ad1670a2c589c271953b08b963440d35bac9f.tar.gz
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
Diffstat (limited to 'thread_pthread.h')
-rw-r--r--thread_pthread.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/thread_pthread.h b/thread_pthread.h
index 60e0fe0ea3..8fb1d521b6 100644
--- a/thread_pthread.h
+++ b/thread_pthread.h
@@ -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