aboutsummaryrefslogblamecommitdiff
path: root/lib/matcha.h
blob: 905107fcd2ca899ca7eda8079d3d0c44dae61e7a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                              

                               
struct Thread {
    Thread(const Thread&) = delete;
    Thread& operator=(const Thread&) = delete;
    Thread(void (*fn)());

    static void entry(void* obj);

    // private:
    void* mStackPtr;
    void (*mUserFn)();
};

void yield_to(const Thread& t);
void yield_from(Thread& t);