Skip to content

Instantly share code, notes, and snippets.

View n1xx1's full-sized avatar
🏠
Working from home

n1xx1

🏠
Working from home
View GitHub Profile
#include <iostream>
#include <csetjmp>
class CoroutineImpl {
public:
using CalledFunction = void(*)(CoroutineImpl*);
CoroutineImpl(CalledFunction func) {
m_stackSize = 8 * 1024;
m_stackPointer = malloc(m_stackSize);
@n1xx1
n1xx1 / main.c
Last active December 12, 2015 16:57
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <inttypes.h>
/** Useless macro boilerplate, I will eventually make it less hacky, I think **/
#define EVAL(...) EVAL1(EVAL1(EVAL1(__VA_ARGS__)))
#define EVAL1(...) EVAL2(EVAL2(EVAL2(__VA_ARGS__)))