aboutsummaryrefslogtreecommitdiffstats
path: root/coroutine
Commit message (Collapse)AuthorAgeFilesLines
* coroutine/ucontext/Context.c: define __EXTENSIONS__ explicitlyYusuke Endoh2019-12-051-1/+6
| | | | | | instead of ruby/config.h, per samuel's request. https://github.com/ruby/ruby/commit/dbfd4b780e3914a3f27e92c2248254452bf0fd6b#diff-7fd78c3cc8a19b7e0637502983ec26ff
* coroutine/ucontext/Context.c: Include "ruby/config.h" for SolarisYusuke Endoh2019-12-041-0/+1
| | | | | getcontext, makecontext, and swapcontext seem to be available only when `__EXTENSION__` is defined on Solaris.
* Fix coroutine support on win32Lars Kanis2019-11-051-1/+1
| | | | | | | | | | | | | 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
* Add assertions to `coroutine_initialize_main`.Samuel Williams2019-07-191-2/+3
|
* Split assertions to check which one fails.Samuel Williams2019-07-191-1/+3
|
* Make fiber_pool more conservative on platforms with limited address space.Samuel Williams2019-07-185-0/+11
| | | | | | | 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.
* Stack copying implementation of coroutines.Samuel Williams2019-07-182-0/+220
|
* Add coroutine context switch for i386-mingw32Lars Kanis2019-07-071-0/+47
| | | | | It's essentially a translation of Context.asm from Intel to AT&T syntax.
* Restore updated implementation of arm32 coroutine code, but prefer ucontext.Samuel Williams2019-06-262-4/+12
|
* Revert "coroutine/arm32/Context.S: save/restore the registers via stack"Yusuke Endoh2019-06-262-5/+4
| | | | | | | 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
* Add `ucontext` coroutine implementation for generic fallback.Samuel Williams2019-06-2610-164/+199
|
* coroutine/arm32/Context.S: save/restore the registers via stackYusuke Endoh2019-06-262-4/+5
| | | | Retry of 518adcca0a and dbe232e24e
* Revert 518adcca0a and dbe232e24eYusuke Endoh2019-06-251-6/+2
| | | | | | | | | | 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
* Order of arguments might be incorrect in arm32 coroutine implementation.Samuel Williams2019-06-251-2/+6
|
* Make COROUTINE_XMM_REGISTERS compile-time only tooNobuyoshi Nakada2019-05-171-2/+4
|
* Remove unused symbolsNobuyoshi Nakada2019-05-162-11/+10
|
* Make COROUTINE_REGISTERS compile-time only not to be a global symbolNobuyoshi Nakada2019-05-167-8/+10
|
* Ensure x86 stack is fortified, fixed #15335.samuel2018-12-111-0/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66341 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Native coroutine implementation for ppc64le Linuxodaira2018-12-102-0/+126
| | | | | | | | | | * 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
* Fix for coroutine/win32/Context.objnobu2018-11-281-0/+1
| | | | | | | | | | | * 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
* Ensure stack is correctly protectedsamuel2018-11-241-0/+4
| | | | | | 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
* Change Makefile rule for assembly to use .S rather than .ssamuel2018-11-245-0/+0
| | | | | | | 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
* Fix argument order.samuel2018-11-241-17/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix indentation.samuel2018-11-206-111/+111
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* GAS style assembly for win64 (mingw).samuel2018-11-202-3/+79
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65876 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix struct usage.samuel2018-11-202-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix line endings.samuel2018-11-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial support for x64-mingw32samuel2018-11-204-18/+55
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Better (?) support for Windows TIB.samuel2018-11-204-17/+40
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65867 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2018-11-201-4/+4
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65862 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Prefer "static inline" to avoid duplicate symbols.samuel2018-11-206-16/+16
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Remove trailing whitespace.samuel2018-11-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65860 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Formatting changes.samuel2018-11-207-12/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65857 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Ensure start function has correct declaration.samuel2018-11-206-6/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65856 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Mark COROUTINE as noreturn.samuel2018-11-205-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Tidy up comments.samuel2018-11-2012-64/+42
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * expand tabs.svn2018-11-201-17/+17
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65848 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Initial effort to support 32-bit Linux.samuel2018-11-202-0/+100
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Restore return value assignmentsamuel2018-11-201-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Native implementation of coroutines to improve performance of fiberssamuel2018-11-2010-0/+513
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e