Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/thread

    r348006f r17af7d1  
    2828// Anything that is resumed is a coroutine.
    2929trait is_thread(dtype T) {
     30      void ^?{}(T* this);
    3031      void main(T* this);
    3132      thread_desc* get_thread(T* this);
    3233};
    3334
    34 #define DECL_THREAD(X) thread_desc* get_thread(X* this) { return &this->t; } void main(X* this)
     35#define DECL_THREAD(X) thread_desc* get_thread(X* this) { return &this->__thrd; } void main(X* this)
    3536
    3637forall( dtype T | is_thread(T) )
    3738static inline coroutine_desc* get_coroutine(T* this) {
    38         return &get_thread(this)->c;
     39        return &get_thread(this)->cor;
    3940}
    4041
    4142static inline coroutine_desc* get_coroutine(thread_desc* this) {
    42         return &this->c;
     43        return &this->cor;
    4344}
    4445
     
    6465void ?{}( scoped(T)* this, P params );
    6566
    66 forall( dtype T | sized(T) | is_thread(T) | { void ^?{}(T*); } )
     67forall( dtype T | sized(T) | is_thread(T) )
    6768void ^?{}( scoped(T)* this );
    6869
Note: See TracChangeset for help on using the changeset viewer.