This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
/* Each coroutine is represented by a pointer to its stack bottom. */ | |
typedef void *co_coro; | |
/* The coroutine procedure takes the calling coroutine as its first argument. */ | |
typedef void (*co_proc)(co_coro back); | |
/* Switch to new coroutine. The stack top must be 16 byte aligned.*/ |