summaryrefslogtreecommitdiff
path: root/coroutine
AgeCommit message (Collapse)Author
2019-12-05coroutine/ucontext/Context.c: define __EXTENSIONS__ explicitlyYusuke Endoh
instead of ruby/config.h, per samuel's request. https://github.com/ruby/ruby/commit/dbfd4b780e3914a3f27e92c2248254452bf0fd6b#diff-7fd78c3cc8a19b7e0637502983ec26ff
2019-12-04coroutine/ucontext/Context.c: Include "ruby/config.h" for SolarisYusuke Endoh
getcontext, makecontext, and swapcontext seem to be available only when `__EXTENSION__` is defined on Solaris.
2019-11-05Fix coroutine support on win32Lars Kanis
Ruby master branch currently fails on win32 MINGW at this spec: https://github.com/ruby/spec/blob/master/core/thread/element_set_spec.rb MINGW makes use of setjmp3() implemented in MSVCRT.DLL. This function traverses the SEH list up to a terminating pointer 0xFFFFFFFF. It therefore currently segfaults on NULL. The SEH linked list must be terminated by 0xFFFFFFFF instead of NULL. This fixes the issue mentioned here: https://github.com/ruby/ruby/pull/2279#issuecomment-509508810 Notes: Merged: https://github.com/ruby/ruby/pull/2645
2019-07-19Add assertions to `coroutine_initialize_main`.Samuel Williams
2019-07-19Split assertions to check which one fails.Samuel Williams
2019-07-18Make fiber_pool more conservative on platforms with limited address space.Samuel Williams
We use COROUTINE_LIMITED_ADDRESS_SPACE to select platforms where address space is 32-bits or less. Fiber pool implementation enables more book keeping, and reduces upper limits, in order to minimise address space utilisation.
2019-07-18Stack copying implementation of coroutines.Samuel Williams
2019-07-07Add coroutine context switch for i386-mingw32Lars Kanis
It's essentially a translation of Context.asm from Intel to AT&T syntax.
2019-06-26Restore updated implementation of arm32 coroutine code, but prefer ucontext.Samuel Williams
2019-06-26Revert "coroutine/arm32/Context.S: save/restore the registers via stack"Yusuke Endoh
This reverts commit 6df1814c08df93bbc0b3e7a73649bcf82e126064. It caused a SEGV again: https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190626T051707Z.fail.html.gz
2019-06-26Add `ucontext` coroutine implementation for generic fallback.Samuel Williams
2019-06-26coroutine/arm32/Context.S: save/restore the registers via stackYusuke Endoh
Retry of 518adcca0a and dbe232e24e
2019-06-25Revert 518adcca0a and dbe232e24eYusuke Endoh
518adcca0a: "Try using arm32 implementation for fibers." dbe232e24e: "Order of arguments might be incorrect in arm32 coroutine implementation." It seems to cause SEGV consistently on Ubuntu armv7l eabihf: https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190625T081710Z.fail.html.gz https://rubyci.org/logs/rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20190625T111708Z.fail.html.gz
2019-06-25Order of arguments might be incorrect in arm32 coroutine implementation.Samuel Williams
2019-05-17Make COROUTINE_XMM_REGISTERS compile-time only tooNobuyoshi Nakada
2019-05-16Remove unused symbolsNobuyoshi Nakada
2019-05-16Make COROUTINE_REGISTERS compile-time only not to be a global symbolNobuyoshi Nakada
2018-12-11Ensure x86 stack is fortified, fixed #15335.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-10Native coroutine implementation for ppc64le Linuxodaira
* configure.ac: enable fiber coroutine for powerpc64le-linux * coroutine/ppc64le/Context.S: coroutine_transfer implementation * coroutine/ppc64le/Context.h: coroutine implementation git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-28Fix for coroutine/win32/Context.objnobu
* coroutine/win32/Context.asm: old ml version 9 needs CPU directive before `.model` directive. * win32/Makefile.sub: specify object directories to separate Win32 and Win64 targets. Win32 rule was overridden by Win64 rule and just ignored. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-24Ensure stack is correctly protectedsamuel
See https://bugs.ruby-lang.org/issues/15335 for more details. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-24Change Makefile rule for assembly to use .S rather than .ssamuel
It is more conventional to use compiler to pre-process and assemble the `.S` file rather than forcing Makefile to use `.s`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-24Fix argument order.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Fix indentation.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20GAS style assembly for win64 (mingw).samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Fix struct usage.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Fix line endings.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Initial support for x64-mingw32samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Better (?) support for Windows TIB.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Prefer "static inline" to avoid duplicate symbols.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Remove trailing whitespace.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Formatting changes.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Ensure start function has correct declaration.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Mark COROUTINE as noreturn.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Tidy up comments.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Initial effort to support 32-bit Linux.samuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Restore return value assignmentsamuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-20Native implementation of coroutines to improve performance of fiberssamuel
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e