Commit Graph

857 Commits

Author SHA1 Message Date
Oliver Kowalke
51d18b8d82 iadd performance test for callcc, execution_context (v2) 2018-02-08 17:27:07 +01:00
Oliver Kowalke
7c3a6b51c5 mark execution_context (v1) as deprecated 2018-02-08 09:56:22 +01:00
Oliver Kowalke
66de43b5ff qualify apply() with full namespace in execution_context (v1/v2) 2018-02-08 09:51:32 +01:00
Oliver Kowalke
109543e23d fix buffer size use by snprintf() in unit-tests 2018-02-08 09:50:40 +01:00
Oliver Kowalke
b6582f13c5 fix unit-test for fiber on Windows 2018-02-08 05:56:35 +01:00
Oliver Kowalke
0249289ff5 register unit-test stacked only one 2018-02-08 06:39:26 +01:00
Oliver Kowalke
c6736e478c set test suite name 2018-02-07 20:56:35 +01:00
Oliver Kowalke
99c3c1cb6a rename fiber_winfiber.hpp -> fiber_winfib.hpp 2018-02-07 20:50:32 +01:00
Oliver Kowalke
c7d01f1854 disable buildng unit-test with ucontext for MacOS X 2018-02-06 19:42:57 +01:00
Oliver Kowalke
ccd9a472c8 docu: fix link to P0876 2018-02-06 19:31:02 +01:00
Oliver Kowalke
618629a987 examples for all context-APIs 2018-02-06 19:29:55 +01:00
Oliver Kowalke
ca42a8e6cc Merge branch 'develop' 2018-02-05 22:09:48 +01:00
Oliver Kowalke
11a238726a fix performance test 2018-02-05 21:08:22 +01:00
Oliver Kowalke
2409751d1d update documentation 2018-02-05 21:02:15 +01:00
Oliver Kowalke
370e35739d modify examples parser and throw 2018-02-05 20:48:47 +01:00
Oliver Kowalke
a0433d1c72 execution_context without depended compilation
- execution_context v1 in namecpase v1
- execution_context v2 in inlined namespace v2
2018-02-05 19:34:35 +01:00
Oliver Kowalke
51ea6b583d re-introduce continuation - fix conflicts 2018-02-05 13:31:35 +01:00
Oliver Kowalke
3fd96c4ef4 add example circle
- demonstrates that fibers keep their identities
2018-02-05 13:31:35 +01:00
Oliver Kowalke
f5327520d6 return fiber from resume()/resume_with() 2018-02-05 13:31:35 +01:00
Oliver Kowalke
91dc3cc053 use temporaries for constructing context 2018-02-05 13:31:35 +01:00
Oliver Kowalke
aa9c50d00c test for valid fiber in resume()/resume_with() 2018-02-05 13:31:32 +01:00
Oliver Kowalke
10d3264f7b implementation of fibers without scheduler according to P0876R0 2018-02-05 13:31:32 +01:00
Oliver Kowalke
620c283195 Merge branch 'develop' 2018-01-18 21:18:55 +01:00
Oliver Kowalke
9db1604923
Merge pull request #71 from jcowgill/context-mips
MIPS o32 Fixes
2018-01-16 05:44:40 +01:00
James Cowgill
9e7c5e0671 mips: simplify finish function
- Don't bother allocating any extra stack space. We can reuse the 16
  bytes at the top of the stack originally used for the gp and transfer_t.
- Don't bother saving the return address which we never read back.
- Use la to load the address of _exit (purely style).
- Move the "move $a0, $zero" instruction so the assembly can put it in
  the delay slot.
- Use "jr" instead of "jalr" because we don't expect _exit to ever
  return.
2018-01-11 14:38:35 +00:00
James Cowgill
3f6c3a0bb7 mips: allocate unused stack space for incoming argument area
The MIPS ABI requires that 16 bytes of unused stack space is allocated by
the caller when calling functions. Some comments refer to "shadow space"
which might be talking about this, but since the captured_context code
was added, the assembly has not actually allocated any extra space.

Therefore, allocate an extra 16 bytes between the fcontext_t data and
the saved GP which the initial function will use.

Also fix the address of the returned transfer_t which was incorrect
(although fairly harmless since this data is never read).
2018-01-11 14:37:34 +00:00
James Cowgill
e0d067c751 mips: optimize stack calculation in make_fcontext
This commit removes some useless moves which are later overwitten at the
start of the "make_fcontext" function.
2018-01-10 14:04:15 +00:00
James Cowgill
3d3bf4a1ec mips: perform jump through t9 in ontop_fcontext
The MIPS ABI requires all calls to be made "through" t9 (so the called
function can easily get its address).
2018-01-05 12:05:40 +00:00
James Cowgill
1491ce4424 mips: use v0 as temporary for returned transfer_t
For functions which return structures indirectly, the MIPS abi requires
the pointer to the returned structure to be in v0 (so in most cases v0
will contain the value passed to the function in a0).
2018-01-05 12:04:15 +00:00
James Cowgill
f410f4d80c mips: remove unused context diagram 2018-01-05 11:52:46 +00:00
Oliver Kowalke
f154ac73b6 add control file for Travice CI 2017-12-20 15:33:01 +01:00
Oliver Kowalke
1d474cb2e4 use continuation::swap() for context version 2017-12-20 07:44:09 +01:00
Oliver Kowalke
93da162dd8 Merge branch 'develop' 2017-11-05 07:56:33 +01:00
Oliver Kowalke
75125efc6e set default stacksize to 128kB for all platforms 2017-11-05 07:55:56 +01:00
Oliver Kowalke
3eec820a2e Merge branch 'develop' 2017-10-07 09:29:38 +02:00
Oliver Kowalke
92be737ce2 use defect macro for std::invoke() 2017-10-06 10:53:50 +02:00
Oliver Kowalke
e2663ba473 return exit-code from example 2017-10-02 15:19:52 +02:00
Oliver Kowalke
59ead04c0a move thread-local pointer of current action-record in compilation unit
- prevents error C4251 on Windows
2017-10-02 14:19:43 +02:00
Oliver Kowalke
56359c87a8 Merge pull request #68 from z33ky/develop
use perfect forwarding for StackAlloc
2017-09-24 08:48:58 +02:00
Alexander 'z33ky' Hirsch
0001e82e58 use perfect forwarding for StackAlloc 2017-09-22 21:41:01 +02:00
oliver Kowalke
649366df42 Merge branch 'develop' 2017-09-13 07:49:24 +02:00
oliver Kowalke
d63df81833 wrap ASan code 2017-09-13 07:48:46 +02:00
Oliver Kowalke
71e6074aed Merge branch 'develop' 2017-09-08 18:34:58 +02:00
Oliver Kowalke
4cbf241b19 Merge pull request #67 from SSE4/clang_windows
- define asm sources for Clang on Windows
2017-09-03 10:35:55 +02:00
SSE4
0660558a39 - define asm sources for Clang on Windows 2017-09-03 12:50:02 +07:00
Oliver Kowalke
94bb3e3879 fix use of ASan API (swapcontext)
- in context of #65
- still needs fix for ASan generated: Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING.
2017-09-02 10:06:28 +02:00
Oliver Kowalke
82bf54e9c2 clean-up of move ctro/assignment 2017-08-29 19:08:19 +02:00
Oliver Kowalke
cb788534ee Merge branch 'develop' 2017-08-25 11:30:01 +02:00
Michael Johns
035d2d78f3 Fix i386/macho routines to correctly return transfer_t in EAX/EDX
The OSX 32bit ABI differs from the System V ABI in that 8 byte structs
are returned in registers EAX/EDX instead of passing the address of the
struct on the stack. See: https://developer.apple.com/library/content/documentation/DeveloperTools/Conceptual/LowLevelABI/130-IA-32_Function_Calling_Conventions/IA32.html

The current implementation for this platform crashes when compiled for
32bit OSX (e.g. when running a 32bit iOS simulator) due to not
satisfying the ABI.
2017-08-24 19:05:57 +02:00
Oliver Kowalke
420554fe9a function executed by resume_with() has to return a continuation 2017-08-10 18:20:29 +02:00