Commit Graph

1840 Commits

Author SHA1 Message Date
oliver Kowalke
f9ffc21772 work-stealing uses one queue for context'
- pinned context (main-/dispatcher-context) pushed
  to same queue a worker-context
- no stealing
2017-03-17 09:59:56 +01:00
oliver Kowalke
e20430afd3 implementation of pop() according to Chase-Lev 2017-03-17 09:51:41 +01:00
oliver Kowalke
9c34d5f98b context_spmc_queue accepts capacity as ctor parameter
- default value is 4096
2017-03-17 09:37:05 +01:00
oliver Kowalke
00964de85a wrap context::remote_ready_ by BOOST_FIBERS_NO_ATOMICS 2017-03-15 10:39:58 +01:00
oliver Kowalke
8303450c35 use memory_order_release for main-/dispatcher context 2017-03-14 11:25:49 +01:00
oliver Kowalke
19494e831d check if returned cotnext is valid
- access data of returend context only if it is valid
- otherwise the stack might be already gone
2017-03-14 11:24:11 +01:00
oliver Kowalke
f828c5599d test for context is resumable
- after picking test wether new context is resumable
- before releasing test wether termianted context is resumable
2017-03-14 11:22:06 +01:00
Oliver Kowalke
d8ff0822fc Merge branch 'develop' 2017-03-12 16:18:34 +01:00
Oliver Kowalke
564e41dd97 fix barrier implementation 2017-03-12 11:14:36 +01:00
Oliver Kowalke
fc7f6e297e Fixed typo in fiber.qbk
- fix provided by Florian Behrens
2017-03-12 11:14:36 +01:00
Oliver Kowalke
7badb2fdc1 fix cpu_relax.h for compilation with Intel compiler on Windows
- patch provided by Melanie Blower
2017-03-12 11:14:36 +01:00
oliver Kowalke
303b462526 use page_size() as stack-size in performance tests 2017-03-12 11:14:36 +01:00
oliver Kowalke
45d1fb3857 additional asserts related to picked context 2017-03-12 11:14:36 +01:00
Oliver Kowalke
14e5033085 other memory-order for atomic reference counting 2017-03-09 21:10:38 +01:00
Oliver Kowalke
9fb4e2cbca Merge branch 'develop' 2017-03-08 21:30:46 +01:00
Oliver Kowalke
a271236e3b pop context from array after xchg in SPMC 2017-03-08 21:29:56 +01:00
Oliver Kowalke
873e5df202 Merge branch 'develop' 2017-03-08 20:27:27 +01:00
Oliver Kowalke
7e6c55e52d test context after xchg in SPMC-queue 2017-03-08 20:25:51 +01:00
oliver Kowalke
da6136fb0a Merge branch 'develop' 2017-03-08 08:11:11 +01:00
oliver Kowalke
bad6140b2d try-ops of buffered_channel must resumed waiting fibers
- fixes #114
- resume a waiting consumer-fiber in try_push()
- resume a waiting producer-fiber in try_pop()
2017-03-08 08:09:14 +01:00
oliver Kowalke
5c9d4e7cdd fix documentation related to channels 2017-03-08 08:09:07 +01:00
oliver Kowalke
68c2e775d8 fix asio example: use context::schedule 2017-03-06 13:36:33 +01:00
Oliver Kowalke
789258ea98 rename set_terminated() -> terminate() 2017-03-06 13:36:33 +01:00
Oliver Kowalke
981b9418bd rename set_ready() -> schedule() 2017-03-06 13:36:33 +01:00
oliver Kowalke
3a945ace60 fix asio example: use context::schedule 2017-03-06 09:03:09 +01:00
Oliver Kowalke
1c1e0bfe65 rename set_terminated() -> terminate() 2017-03-05 15:08:52 +01:00
Oliver Kowalke
728bd776ad rename set_ready() -> schedule() 2017-03-05 15:08:52 +01:00
Oliver Kowalke
b56d6bf844 Merge branch 'develop' 2017-03-05 10:44:57 +01:00
Oliver Kowalke
98bd3a8fb4 renaming of memberfunctions of continuation 2017-03-05 10:43:18 +01:00
oliver Kowalke
c3ebe62cd4 use scheduler from active cotnext if joining
- use scheduler from active-context in context::join()
- the fiber that will be joined might be already terminated
  while active-fiber tries to join
2017-03-03 14:40:49 +01:00
oliver Kowalke
09539f19ba Merge branch 'develop' 2017-03-03 13:32:04 +01:00
oliver Kowalke
4ced902a32 protect posting ready fiber to remote scheduler
- without spinlock in scheduler::set_remote_ready()
  the scheudler might termiante (~scheduler()) while
  another thread invokes scheduler::set_remote_ready()
2017-03-03 13:30:08 +01:00
oliver Kowalke
c7a6bae2e3 remove macro 2017-03-03 09:48:57 +01:00
oliver Kowalke
8496dbf9c8 remove unused example 2017-03-03 09:48:11 +01:00
oliver Kowalke
94908d0b75 Merge branch 'develop' 2017-03-03 08:16:17 +01:00
oliver Kowalke
8d53732808 fix renaming of ready_queue_type in examples 2017-03-03 08:15:38 +01:00
oliver Kowalke
842cbd5fff context::scheduler_ memory-order for load/store 2017-02-27 08:55:26 +01:00
oliver Kowalke
1646a66b1f fix dequeuing context' from remote-ready-queue 2017-02-27 08:45:32 +01:00
Oliver Kowalke
5f11098a37 use devect macro for std::invoke() 2017-02-26 20:36:32 +01:00
Oliver Kowalke
d8181c3155 use defect macro for std::apply() 2017-02-26 20:36:13 +01:00
Oliver Kowalke
2274cf6b9d remove (un)bounded_channel 2017-02-26 20:26:23 +01:00
Oliver Kowalke
fa95e9740f code re-formating 2017-02-26 20:22:58 +01:00
Oliver Kowalke
5f909cac14 remove compiler warning related to unused variable 2017-02-26 17:31:57 +01:00
Oliver Kowalke
bf0791e2fd fix assertions for link-state 2017-02-26 17:23:19 +01:00
Oliver Kowalke
2aaa869366 remove scheduler::get_next_() 2017-02-26 14:49:50 +01:00
Oliver Kowalke
57acf06cb4 remove main-context from dispatcher-context wait queue
- on termination the maincontext joins the dispatcher context
2017-02-26 12:20:48 +01:00
Oliver Kowalke
8fb2c6fd9c remove dequeing from wait-queue
- the context was not enqueued in the wait-queue
- therefore no need to dequeue it from the wait-queue
2017-02-26 12:01:08 +01:00
Oliver Kowalke
57d66ed259 remove from wait-queue only if wait fails
- context is stored in condition-variable's wait-queue
- notify_one()/notify_all() dequeue the context from the wait-queue
- therefore no need to remove it in wait() after getting  resumed
- exception is only  wait_until() f timeout occured
2017-02-26 11:57:35 +01:00
Oliver Kowalke
89dbbbdf69 fix example ping_pong 2017-02-26 11:11:37 +01:00
Oliver Kowalke
748c591077 Merge branch 'develop' 2017-02-25 10:28:04 +01:00