Oliver Kowalke
43866a4d2e
fix comparasion of atomics for MSVC
2016-05-03 18:23:09 +02:00
Oliver Kowalke
968c32c842
replace context::migrate() by context::attach()/context::detach()
2016-05-02 18:56:17 +02:00
oliver Kowalke
5218f46350
remove unecessary argument in scheduler::suspend()
2016-04-25 10:29:44 +02:00
Oliver Kowalke
57267ec957
remove support for fiber interruption
2016-04-19 18:16:31 +02:00
oliver Kowalke
5027d3526f
impl. remote-ready-queue with std::vector<>
2016-04-18 12:52:48 +02:00
Oliver Kowalke
8d80a4503c
pass to correct scheduler
2016-04-15 22:54:45 +02:00
oliver Kowalke
45af3585db
migrate context: scheduler must be different
2016-04-08 14:02:32 +02:00
Oliver Kowalke
a48c0eb491
fix include of headers
2016-02-27 20:07:06 +01:00
Oliver Kowalke
e43cf5b1ac
enum for context types
2016-02-15 19:49:22 +01:00
Oliver Kowalke
547e19a811
adapt to template execution_context (v2)
2016-02-09 17:15:36 +01:00
Oliver Kowalke
778656934f
captured_context renamed to execution_context (v2)
...
- execution_context (v2) is enabled per default
- execution_context (v1) is used for segmented stacks
2016-02-06 13:34:10 +01:00
Oliver Kowalke
12555f9561
execution_context required for segmented stacks
2016-02-06 10:21:54 +01:00
Oliver Kowalke
7e183329ee
use captured_context aonly
2016-02-05 18:14:38 +01:00
Oliver Kowalke
bacbb59afa
pass active cotnext directly to yield()
2016-02-02 17:06:21 +01:00
Oliver Kowalke
db180f08da
relax to C++11
2015-12-12 23:19:33 +01:00
Oliver Kowalke
5b2effab58
relax to C++11
2015-12-09 19:21:25 +01:00
Oliver Kowalke
e9a0d4d669
remove noexcept from dtor of context+scheduler
2015-12-05 15:14:31 +01:00
Oliver Kowalke
c8071c5373
fix data_t for MSVC 14 (initializer-list issue)
2015-12-04 18:26:49 +01:00
Oliver Kowalke
3319841788
use spinlock_lock+context instead of function<>
2015-12-03 17:57:00 +01:00
Oliver Kowalke
abbc507d13
re-factor futures
2015-12-02 21:57:27 +01:00
Oliver Kowalke
0519929d26
C++14 - context
2015-12-02 17:18:31 +01:00
Oliver Kowalke
726d4d51b9
++14 polishing
2015-12-01 21:07:11 +01:00
Oliver Kowalke
7bd1863115
apply noexcept
2015-11-25 19:32:32 +01:00
Oliver Kowalke
a344247f07
remove forced_unwind and related functions
...
- unwinding the stack via exception is not always necessary
- usually a fiber returns from its fiber-fn (stack is already unwound)
- if a fiber has to terminate, interrupt that fiber
2015-11-25 19:30:25 +01:00
Oliver Kowalke
6d3f00902f
use this in capture-list
2015-11-22 14:42:28 +01:00
Oliver Kowalke
ca655a84d9
execute func + set active fiber inside context::resume()
2015-11-22 14:28:09 +01:00
Oliver Kowalke
5277c51bbb
re-add previously removed context::attach()
2015-10-21 15:40:50 +02:00
Oliver Kowalke
f743b63bc0
replace context::attach()/detach() by context::migrate()
2015-10-21 15:25:12 +02:00
Oliver Kowalke
4710e12fe1
rename scheduler::re_schedule() -> scheduler::suspend()
2015-10-18 20:03:38 +02:00
Oliver Kowalke
abe114ad81
segmented-stacks=on -> only segmented_stack is available
2015-10-18 19:21:45 +02:00
Oliver Kowalke
559e498982
context::terminate() as replacement for set_terminated_()/release()
2015-10-17 15:10:28 +02:00
Oliver Kowalke
bafd65bcf3
remove yield-queue + pass functor to resume-op
2015-10-16 21:48:57 +02:00
Oliver Kowalke
79e5776805
qualify functions which use intrusive-list with const and noexcept
2015-10-14 16:05:20 +02:00
Oliver Kowalke
51c1a96c4d
introduce attach/detach of context
2015-10-14 13:37:44 +02:00
Oliver Kowalke
c738fefec7
remove spinlock protecting context lists
2015-10-12 21:59:47 +02:00
Oliver Kowalke
dbfd80fb2d
use yield-queue because work-sharing
...
- yield-queue prevents resumtion of a fiber which is passed to
awakened() but has not yet suspended
2015-10-10 21:52:03 +02:00
Oliver Kowalke
4a37a15d19
move make_dispatcher_context() to cpp file
2015-10-03 09:14:33 +02:00
Oliver Kowalke
8662b5e253
align main context and scheduler to 64byte boundaries
2015-10-02 19:52:43 +02:00
Oliver Kowalke
4cd1a910d9
use schwarz counter idiom for static variable initialization
2015-10-02 17:28:59 +02:00
Oliver Kowalke
20196fcd69
set active context to nullptr in ~scheduler()
2015-09-30 19:58:04 +02:00
Oliver Kowalke
4c791a3790
support for fiber properties + custom scheduler
2015-09-29 17:54:29 +02:00
Oliver Kowalke
a847baa932
link/unlink of context protected by spinlock
2015-09-28 19:58:22 +02:00
Oliver Kowalke
eb7c4249d5
rename managed_is_linked() -> worker_is_linked()
2015-09-28 19:35:59 +02:00
Oliver Kowalke
73b03c1d67
use std::allocator_arg for execution_context ctor
2015-09-27 16:09:11 +02:00
Oliver Kowalke
fc404c58eb
unwind at shutdown
...
- scheduler holds a list of managed worker-fibers
- ~scheduler() requests stack unwinding for fibers not yet terminated
2015-09-24 17:35:40 +02:00
Oliver Kowalke
1b274d9b73
support for fiber-specific storage
2015-09-22 19:10:09 +02:00
Oliver Kowalke
128b534058
fix context
2015-09-21 20:34:41 +02:00
Oliver Kowalke
38457260bc
remoce noexcept specifier from context::join()
2015-09-21 20:34:09 +02:00
Oliver Kowalke
1ad58fbba1
add interruption
2015-09-21 20:18:53 +02:00
Oliver Kowalke
eec3d34fb0
remote ready-queue uses differrent hook than local ready-queue
2015-09-20 22:06:59 +02:00