Ruby
3.5.0dev (2025-01-10 revision 5fab31b15e32622c4b71d1d347a41937e9f9c212)
coroutine
ucontext
Context.c
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.
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
15
#include "Context.h"
16
17
void
coroutine_trampoline(
void
* _start,
void
* _context)
18
{
19
coroutine_start start = (coroutine_start)_start;
20
struct
coroutine_context
* context = _context;
21
22
start(context->from, context);
23
}
coroutine_context
Definition
Context.h:36
Generated by
1.9.8