Ignore:
Timestamp:
Jul 5, 2021, 4:44:20 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
7f62b708
Parents:
ee23a8d
Message:

Step 1 of changing $thread to thread$

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/thread.hfa

    ree23a8d re84ab3d  
    2929        void ^?{}(T& mutex this);
    3030        void main(T& this);
    31         $thread* get_thread(T& this);
     31        thread$ * get_thread(T& this);
    3232};
    3333
     
    4545// Inline getters for threads/coroutines/monitors
    4646forall( T & | is_thread(T) )
    47 static inline $coroutine* get_coroutine(T & this) __attribute__((const)) { return &get_thread(this)->self_cor; }
     47static inline coroutine$ * get_coroutine(T & this) __attribute__((const)) { return &get_thread(this)->self_cor; }
    4848
    4949forall( T & | is_thread(T) )
    50 static inline $monitor  * get_monitor  (T & this) __attribute__((const)) { return &get_thread(this)->self_mon; }
     50static inline monitor$   * get_monitor  (T & this) __attribute__((const)) { return &get_thread(this)->self_mon; }
    5151
    52 static inline $coroutine* get_coroutine($thread * this) __attribute__((const)) { return &this->self_cor; }
    53 static inline $monitor  * get_monitor  ($thread * this) __attribute__((const)) { return &this->self_mon; }
     52static inline coroutine$ * get_coroutine(thread$ * this) __attribute__((const)) { return &this->self_cor; }
     53static inline monitor$   * get_monitor  (thread$ * this) __attribute__((const)) { return &this->self_mon; }
    5454
    5555//-----------------------------------------------------------------------------
     
    6262//-----------------------------------------------------------------------------
    6363// Ctors and dtors
    64 void ?{}($thread & this, const char * const name, struct cluster & cl, void * storage, size_t storageSize );
    65 void ^?{}($thread & this);
     64void ?{}(thread$ & this, const char * const name, struct cluster & cl, void * storage, size_t storageSize );
     65void ^?{}(thread$ & this);
    6666
    67 static inline void ?{}($thread & this)                                                                  { this{ "Anonymous Thread", *mainCluster, 0p, 65000 }; }
    68 static inline void ?{}($thread & this, size_t stackSize )                                               { this{ "Anonymous Thread", *mainCluster, 0p, stackSize }; }
    69 static inline void ?{}($thread & this, void * storage, size_t storageSize )                             { this{ "Anonymous Thread", *mainCluster, storage, storageSize }; }
    70 static inline void ?{}($thread & this, struct cluster & cl )                                            { this{ "Anonymous Thread", cl, 0p, 65000 }; }
    71 static inline void ?{}($thread & this, struct cluster & cl, size_t stackSize )                          { this{ "Anonymous Thread", cl, 0p, stackSize }; }
    72 static inline void ?{}($thread & this, struct cluster & cl, void * storage, size_t storageSize )        { this{ "Anonymous Thread", cl, storage, storageSize }; }
    73 static inline void ?{}($thread & this, const char * const name)                                         { this{ name, *mainCluster, 0p, 65000 }; }
    74 static inline void ?{}($thread & this, const char * const name, struct cluster & cl )                   { this{ name, cl, 0p, 65000 }; }
    75 static inline void ?{}($thread & this, const char * const name, struct cluster & cl, size_t stackSize ) { this{ name, cl, 0p, stackSize }; }
     67static inline void ?{}(thread$ & this)                                                                  { this{ "Anonymous Thread", *mainCluster, 0p, 65000 }; }
     68static inline void ?{}(thread$ & this, size_t stackSize )                                               { this{ "Anonymous Thread", *mainCluster, 0p, stackSize }; }
     69static inline void ?{}(thread$ & this, void * storage, size_t storageSize )                             { this{ "Anonymous Thread", *mainCluster, storage, storageSize }; }
     70static inline void ?{}(thread$ & this, struct cluster & cl )                                            { this{ "Anonymous Thread", cl, 0p, 65000 }; }
     71static inline void ?{}(thread$ & this, struct cluster & cl, size_t stackSize )                          { this{ "Anonymous Thread", cl, 0p, stackSize }; }
     72static inline void ?{}(thread$ & this, struct cluster & cl, void * storage, size_t storageSize )        { this{ "Anonymous Thread", cl, storage, storageSize }; }
     73static inline void ?{}(thread$ & this, const char * const name)                                         { this{ name, *mainCluster, 0p, 65000 }; }
     74static inline void ?{}(thread$ & this, const char * const name, struct cluster & cl )                   { this{ name, cl, 0p, 65000 }; }
     75static inline void ?{}(thread$ & this, const char * const name, struct cluster & cl, size_t stackSize ) { this{ name, cl, 0p, stackSize }; }
    7676
    7777struct thread_dtor_guard_t {
     
    111111// Unpark a thread, if the thread is already blocked, schedule it
    112112//                  if the thread is not yet block, signal that it should rerun immediately
    113 void unpark( $thread * this );
     113void unpark( thread$ * this );
    114114
    115115forall( T & | is_thread(T) )
Note: See TracChangeset for help on using the changeset viewer.