diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-20 21:34:39 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-08-20 21:34:39 +0000 |
commit | 17e4aff277a350fa6afea31bc521c9a3f4f47353 (patch) | |
tree | 90ba3ef3466488f774f2d9dd3a6277b2e0ab3816 /thread_win32.c | |
parent | ce48b55805873ad3913be832e919e3ebe8b8f7a3 (diff) |
thread_pthread.c: reinitialize ubf_list at fork
It's possible for the ubf_list_head to be populated with dead
threads at fork or the ubf_list_lock to be held, so reinitialize
both at startup.
And while we're at it, use a static initializer at startup
to save a library call and kill some ifdef.
[ruby-core:88578] [Bug #15013]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'thread_win32.c')
-rw-r--r-- | thread_win32.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/thread_win32.c b/thread_win32.c index 6e9f18f458..af9d3517fa 100644 --- a/thread_win32.c +++ b/thread_win32.c @@ -23,6 +23,7 @@ #define ubf_wakeup_all_threads() do {} while (0) #define ubf_threads_empty() (1) #define ubf_timer_disarm() do {} while (0) +#define ubf_list_atfork() do {} while (0) static volatile DWORD ruby_native_thread_key = TLS_OUT_OF_INDEXES; |