Ignore:
Timestamp:
Jan 25, 2017, 1:09:20 PM (9 years ago)
Author:
Rob Schluntz <rschlunt@…>
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:
ad56482
Parents:
4a9ccc3 (diff), 2cdf6dc (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/threads

    r4a9ccc3 rad6343e  
    2727// Anything that implements this trait can be resumed.
    2828// Anything that is resumed is a coroutine.
    29 trait is_thread(dtype T /*| sized(T)*/) {
     29trait is_thread(dtype T | sized(T)) {
    3030      void main(T* this);
    3131      thread_h* get_thread(T* this);
    32         /*void ?{}(T*);
    33         void ^?{}(T*);*/
    3432};
    3533
    3634#define DECL_THREAD(X) static inline thread_h* get_thread(X* this) { return &this->t; } void main(X* this);
    3735
    38 forall(otype T | is_thread(T) )
     36forall( dtype T | sized(T) | is_thread(T) )
    3937static inline coroutine* get_coroutine(T* this) {
    4038        return &get_thread(this)->c;
     
    5553// thread runner
    5654// Structure that actually start and stop threads
    57 forall(otype T | is_thread(T) )
     55forall( dtype T | sized(T) | is_thread(T) )
    5856struct thread {
    5957        T handle;
    6058};
    6159
    62 forall(otype T | is_thread(T) )
     60forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T*); } )
    6361void ?{}( thread(T)* this );
    6462
    65 forall(otype T, ttype P | is_thread(T) | { void ?{}(T*, P); } )
     63forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T*, P); } )
    6664void ?{}( thread(T)* this, P params );
    6765
    68 forall(otype T | is_thread(T) )
     66forall( dtype T | sized(T) | is_thread(T) | { void ^?{}(T*); } )
    6967void ^?{}( thread(T)* this );
    7068
Note: See TracChangeset for help on using the changeset viewer.