Commit Graph

70 Commits (09c3c02c33ced3ab097fb6a1443c03d88a7ddcb3)

Author SHA1 Message Date
Daniel Kolesa 62676f4222 rename octastd to libostd 2017-04-06 20:14:52 +02:00
Daniel Kolesa 94915ee5fc merge coroutine context into coroutine.hh 2017-03-28 18:59:16 +02:00
Daniel Kolesa 422a65cade actually free coroutine stacks in dtor (more predictable and safer) 2017-03-22 22:38:48 +01:00
Daniel Kolesa 18cfe5119f track current task for coroutine scheduler separately 2017-03-22 18:23:29 +01:00
Daniel Kolesa 2537d955d1 fixes, bigger stack for main task, take spawn funcs by value 2017-03-22 17:32:58 +01:00
Daniel Kolesa 0da22e777d add a way to retrieve the current coroutine context 2017-03-17 03:04:15 +01:00
Daniel Kolesa 06fbdc7419 remove coroutine_type, but keep public context 2017-03-17 02:46:24 +01:00
Daniel Kolesa 959f319318 type inspection support on coroutines (with context as common base type) 2017-03-17 02:38:37 +01:00
Daniel Kolesa ce155190e0 do not store the allocator/stack pointer directly, also call stack allocator dtor 2017-03-15 01:19:01 +01:00
Daniel Kolesa 78d6a23ad3 align the stack pointer by 16 bytes 2017-03-15 00:59:26 +01:00
Daniel Kolesa b63729641b auto unwind in coroutine_context (no manual dtor), clean up generator 2017-03-13 17:29:48 +01:00
Daniel Kolesa c2b82771f9 hide internal coroutine_context funcs from the rest 2017-03-12 16:58:33 +01:00
Daniel Kolesa f1341b913c unify context_call between coroutines and generators 2017-03-12 16:54:49 +01:00
Daniel Kolesa 88e6fe3906 revert the stack freeing method (can be achieved via stack allocator) 2017-03-11 18:24:55 +01:00
Daniel Kolesa 20f57dad9b dealloc stacks in destructor (allows stack reuse) 2017-03-11 17:57:04 +01:00
Daniel Kolesa 0185fa7c12 coroutine fixes/cleanups, remove INIT state (can be checked better) 2017-03-11 17:23:50 +01:00
Daniel Kolesa 8e97f7fdfd separate stack stuff into its own file, add support for segmented stacks on POSIX+gcc/clang 2017-03-08 18:11:39 +01:00
Daniel Kolesa 81feac59d1 add separate protected and unprotected stack allocators, use unprotected by default 2017-03-08 02:16:24 +01:00
Daniel Kolesa 48d039aea0 initial support for stack allocator objects 2017-03-08 02:06:56 +01:00
Daniel Kolesa 7d0778cf0a kill coroutine stack from entrypoint instead of destructor 2017-03-08 01:43:41 +01:00
Daniel Kolesa 1d5c98f830 add valgrind support to coroutine code 2017-03-08 00:52:31 +01:00
Daniel Kolesa 4987fd568d windows typo fix 2017-03-07 22:55:05 +01:00
Daniel Kolesa c526f12b81 use malloc on systems without MAP_ANON/ANONYMOUS (they're not in POSIX) 2017-03-07 22:48:44 +01:00
Daniel Kolesa 58206da3b4 use mmap to allocate stack on POSIX, VirtualAlloc on Windows 2017-03-07 22:39:17 +01:00
Daniel Kolesa 661393f9c5 some initial stack alloc/free funcs 2017-03-07 21:53:16 +01:00
Daniel Kolesa 3145ebe0c9 move coroutine context stuff to a separate file 2017-03-07 21:29:12 +01:00
Daniel Kolesa e0072773e1 remove custom hashtable; no longer necessary 2017-01-31 19:31:55 +01:00
Daniel Kolesa 2884f4b47b use size_t and ptrdiff_t 2017-01-30 19:11:49 +01:00
Daniel Kolesa 2c7f98f57e use standard swap 2017-01-29 15:56:02 +01:00
Daniel Kolesa c751275d83 remove remains of tuple headers 2017-01-28 19:39:50 +01:00
Daniel Kolesa c8c24300ee fully use standard tuples 2017-01-28 19:06:52 +01:00
Daniel Kolesa 2e7bba2c95 remove Pair, more standard tuple usage etc 2017-01-28 18:52:34 +01:00
Daniel Kolesa 7e96183648 start moving over to standard tuple 2017-01-28 18:30:31 +01:00
Daniel Kolesa 56a3327dce use standard vector and move/forward 2017-01-25 01:57:24 +01:00
Daniel Kolesa 27005f1715 remove native ostd threading/atomic stuff (just use c++11 ones) 2017-01-24 00:35:07 +01:00
Daniel Kolesa 41ad273c32 std allowed by default 2017-01-14 15:09:27 +01:00
Daniel Kolesa 519c9c7624 more noexcept and readme note 2016-09-11 21:20:03 +02:00
Daniel Kolesa 8afffc1fb7 refactoring, style updates, various fixes 2016-07-31 20:40:25 +01:00
Daniel Kolesa 47ed1a700c don't use classic style casts 2016-07-02 04:57:23 +01:00
Daniel Kolesa 7561d40b14 missed inline 2016-05-04 00:50:52 +01:00
Daniel Kolesa 75e27a14b0 overload rvalue refs to const for tuple 2016-05-02 18:21:54 +01:00
Daniel Kolesa b66c684add add trailing newlines 2016-02-07 21:19:20 +00:00
Daniel Kolesa 3495d6ea2f remove platform.hh include 2016-01-28 18:36:48 +00:00
Daniel Kolesa 0580638905 move windows.h include into its own header (to define LEAN_AND_MEAN and NOMINMAX in all places) 2016-01-27 19:35:11 +00:00
Daniel Kolesa 4b9faefa5c convert locking/cond code to pthreads to get rid of awful c11 api 2016-01-24 15:33:15 +00:00
Daniel Kolesa 4eb03ad017 lock fixes 2016-01-23 22:38:30 +00:00
Daniel Kolesa 98eeb765fd initial implementation of locking primitives and conditions 2016-01-23 22:16:10 +00:00
Daniel Kolesa d1feaafb5e change style for constants 2016-01-22 18:12:39 +00:00
Daniel Kolesa 305d3e54f6 cleanups 2016-01-21 17:58:51 +00:00
Daniel Kolesa 5902299a1d convert the remaining usage of Constant and all the remaining public traits 2016-01-20 19:05:11 +00:00