Ignore:
Timestamp:
Aug 11, 2017, 10:10:26 AM (8 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:
fd344aa
Parents:
8499c707
Message:

Fix concurrency library, tests, and keywords for references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/thread

    r8499c707 r83a071f9  
    3030trait is_thread(dtype T) {
    3131      void ^?{}(T& mutex this);
    32       void main(T* this);
    33       thread_desc* get_thread(T* this);
     32      void main(T& this);
     33      thread_desc* get_thread(T& this);
    3434};
    3535
    36 #define DECL_THREAD(X) thread_desc* get_thread(X* this) { return &this->__thrd; } void main(X* this)
     36#define DECL_THREAD(X) thread_desc* get_thread(X& this) { return &this.__thrd; } void main(X& this)
    3737
    3838forall( dtype T | is_thread(T) )
    39 static inline coroutine_desc* get_coroutine(T* this) {
     39static inline coroutine_desc* get_coroutine(T & this) {
    4040        return &get_thread(this)->cor;
    4141}
    4242
    4343forall( dtype T | is_thread(T) )
    44 static inline monitor_desc* get_monitor(T * this) {
     44static inline monitor_desc* get_monitor(T & this) {
    4545        return &get_thread(this)->mon;
    4646}
     
    5757
    5858forall( dtype T | is_thread(T) )
    59 void __thrd_start( T* this );
     59void __thrd_start( T & this );
    6060
    6161//-----------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.