Ruby
2.7.1p83(2020-03-31revisiona0c7c23c9cec0d0ffcba012279cd652d28ad5bf3)
coroutine
ucontext
Context.c
Go to the documentation of this file.
1
/*
2
* This file is part of the "Coroutine" project and released under the MIT License.
3
*
4
* Created by Samuel Williams on 24/6/2019.
5
* Copyright, 2019, by Samuel Williams. All rights reserved.
6
*/
7
8
/* According to Solaris' ucontext.h, makecontext, etc. are removed in SUSv4.
9
* To enable the prototype declarations, we need to define __EXTENSIONS__.
10
*/
11
#if defined(__sun) && !defined(__EXTENSIONS__)
12
#define __EXTENSIONS__
13
#endif
14
#include "
Context.h
"
15
16
void
coroutine_trampoline
(
void
* _start,
void
* _context)
17
{
18
coroutine_start
start = _start;
19
struct
coroutine_context
* context = _context;
20
21
start(context->
from
, context);
22
}
coroutine_trampoline
void coroutine_trampoline(void *_start, void *_context)
Definition:
Context.c:16
coroutine_start
COROUTINE(* coroutine_start)(struct coroutine_context *from, struct coroutine_context *self)
Definition:
Context.h:22
coroutine_context::from
struct coroutine_context * from
Definition:
Context.h:37
Context.h
coroutine_context
Definition:
Context.h:17
Generated by
1.8.17