summaryrefslogtreecommitdiff
path: root/coroutine/ucontext
diff options
context:
space:
mode:
authorSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-06-26 10:17:26 +1200
committerSamuel Williams <samuel.williams@oriontransfer.co.nz>2021-07-01 11:23:03 +1200
commit42130a64f02294dc8025af3a51bda518c67ab33d (patch)
treee81c181770e4cc9d3e87e960a25a870e9a4774f5 /coroutine/ucontext
parent9c9531950c007872d7726f050a1dc0cb6f8f0490 (diff)
downloadruby-42130a64f02294dc8025af3a51bda518c67ab33d.tar.gz
Replace copy coroutine with pthread implementation.
Diffstat (limited to 'coroutine/ucontext')
-rw-r--r--coroutine/ucontext/Context.c1
-rw-r--r--coroutine/ucontext/Context.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/coroutine/ucontext/Context.c b/coroutine/ucontext/Context.c
index 9ba76ee628..5d728d554d 100644
--- a/coroutine/ucontext/Context.c
+++ b/coroutine/ucontext/Context.c
@@ -11,6 +11,7 @@
#if defined(__sun) && !defined(__EXTENSIONS__)
#define __EXTENSIONS__
#endif
+
#include "Context.h"
void coroutine_trampoline(void * _start, void * _context)
diff --git a/coroutine/ucontext/Context.h b/coroutine/ucontext/Context.h
index 39d7ca70ca..d338d8de60 100644
--- a/coroutine/ucontext/Context.h
+++ b/coroutine/ucontext/Context.h
@@ -27,6 +27,7 @@ struct coroutine_context
{
ucontext_t state;
struct coroutine_context * from;
+ void *argument;
};
typedef COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self);