Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/thread

    r17af7d1 r348006f  
    2828// Anything that is resumed is a coroutine.
    2929trait is_thread(dtype T) {
    30       void ^?{}(T* this);
    3130      void main(T* this);
    3231      thread_desc* get_thread(T* this);
    3332};
    3433
    35 #define DECL_THREAD(X) thread_desc* get_thread(X* this) { return &this->__thrd; } void main(X* this)
     34#define DECL_THREAD(X) thread_desc* get_thread(X* this) { return &this->t; } void main(X* this)
    3635
    3736forall( dtype T | is_thread(T) )
    3837static inline coroutine_desc* get_coroutine(T* this) {
    39         return &get_thread(this)->cor;
     38        return &get_thread(this)->c;
    4039}
    4140
    4241static inline coroutine_desc* get_coroutine(thread_desc* this) {
    43         return &this->cor;
     42        return &this->c;
    4443}
    4544
     
    6564void ?{}( scoped(T)* this, P params );
    6665
    67 forall( dtype T | sized(T) | is_thread(T) )
     66forall( dtype T | sized(T) | is_thread(T) | { void ^?{}(T*); } )
    6867void ^?{}( scoped(T)* this );
    6968
Note: See TracChangeset for help on using the changeset viewer.