Ignore:
Timestamp:
Nov 28, 2016, 4:02:45 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
1f44196
Parents:
f773f67
Message:

Implemented suspend and resume for coroutines (CtxSw? does nothing)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/threads

    rf773f67 r9129a84  
    1717#define __THREADS_H__
    1818
     19#include <stdbool.h>
    1920
    2021struct coroutine {
    21       int blarg;
     22      coroutine* last;
     23      const char* name;
     24      bool notHalted;
    2225};
     26
     27void ?{}(coroutine* this);
    2328
    2429trait coroutine_t(dtype T) {
     
    2631};
    2732
    28 forall(dtype T | coroutine_t(T))
    29 void suspend(T* cor);
     33void suspend(void);
    3034
    3135forall(dtype T | coroutine_t(T))
Note: See TracChangeset for help on using the changeset viewer.