Ignore:
Timestamp:
May 18, 2018, 2:09:21 PM (6 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
new-env, with_gc
Children:
2472a19
Parents:
f6f0cca3 (diff), c7d8100c (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 remote-tracking branch 'origin/master' into with_gc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/thread

    rf6f0cca3 rff29f08  
    2020
    2121#include "coroutine"
     22#include "kernel"
    2223#include "monitor"
    2324
    2425//-----------------------------------------------------------------------------
    25 // Coroutine trait
    26 // Anything that implements this trait can be resumed.
    27 // Anything that is resumed is a coroutine.
     26// thread trait
    2827trait is_thread(dtype T) {
    2928      void ^?{}(T& mutex this);
     
    5251}
    5352
    54 //extern thread_local thread_desc * volatile this_thread;
     53extern struct cluster * mainCluster;
    5554
    5655forall( dtype T | is_thread(T) )
     
    5958//-----------------------------------------------------------------------------
    6059// Ctors and dtors
    61 void ?{}(thread_desc& this);
    62 void ^?{}(thread_desc& this);
     60void ?{}(thread_desc & this, const char * const name, struct cluster & cl, void * storage, size_t storageSize );
     61void ^?{}(thread_desc & this);
     62
     63static inline void ?{}(thread_desc & this)                                                                  { this{ "Anonymous Thread", *mainCluster, NULL, 0 }; }
     64static inline void ?{}(thread_desc & this, size_t stackSize )                                               { this{ "Anonymous Thread", *mainCluster, NULL, stackSize }; }
     65static inline void ?{}(thread_desc & this, void * storage, size_t storageSize )                             { this{ "Anonymous Thread", *mainCluster, storage, storageSize }; }
     66static inline void ?{}(thread_desc & this, struct cluster & cl )                                            { this{ "Anonymous Thread", cl, NULL, 0 }; }
     67static inline void ?{}(thread_desc & this, struct cluster & cl, size_t stackSize )                          { this{ "Anonymous Thread", cl, 0, stackSize }; }
     68static inline void ?{}(thread_desc & this, struct cluster & cl, void * storage, size_t storageSize )        { this{ "Anonymous Thread", cl, storage, storageSize }; }
     69static inline void ?{}(thread_desc & this, const char * const name)                                         { this{ name, *mainCluster, NULL, 0 }; }
     70static inline void ?{}(thread_desc & this, const char * const name, struct cluster & cl )                   { this{ name, cl, NULL, 0 }; }
     71static inline void ?{}(thread_desc & this, const char * const name, struct cluster & cl, size_t stackSize ) { this{ name, cl, NULL, stackSize }; }
    6372
    6473//-----------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.