aboutsummaryrefslogtreecommitdiffstats
path: root/coroutine
Commit message (Collapse)AuthorAgeFilesLines
* Fix "Ruby is not properly fortified on armv7hl".Samuel Williams2020-12-081-0/+4
| | | | See <https://bugs.ruby-lang.org/issues/16762> for more details.
* Protoized old pre-ANSI K&R style definitionsNobuyoshi Nakada2020-12-051-3/+3
|
* Proposed method for dealing with stack locals which have non-local lifetime.Samuel Williams2020-12-051-0/+16
|
* Rework the order of operations to avoid stack smashing.Samuel Williams2020-12-051-19/+40
|
* Prefix export symbol prefix to coroutine_transferNobuyoshi Nakada2020-07-053-8/+17
|
* Removed trailing spaces [ci skip]Nobuyoshi Nakada2020-07-052-4/+4
|
* Patch assembly so that it aligns properlyPaul Jordan2020-04-011-1/+5
|
* function pointers are not void*卜部昌平2020-02-061-1/+1
| | | | The same as 8427fca49bd85205f5a8766292dd893f003c0e48.
* Remove "All Rights Reserved." from Copyright statement.Samuel Williams2019-12-284-4/+4
|
* Remove "All Rights Reserved." from Copyright statement.Samuel Williams2019-12-2813-13/+13
|
* Fix coroutine copy implementation on OpenBSDJeremy Evans2019-12-271-0/+4
| | | | | | | | | | OpenBSD is the only platform that uses this support by default, and it did not work because while OpenBSD supports alloca, it does not include alloca.h. This should be backported to Ruby 2.7. From George Koehler
* decouple internal.h headers卜部昌平2019-12-267-0/+14
| | | | | | | | | | | | | | | | | | Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies).
* 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