Ignore:
Timestamp:
Jan 24, 2017, 4:50:45 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
2cdf6dc
Message:

Renamed thread to scoped and thread_h to thread

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified src/libcfa/concurrency/threads

    r2cdf6dc re15df4c  
    2929trait is_thread(dtype T | sized(T)) {
    3030      void main(T* this);
    31       thread_h* get_thread(T* this);
     31      thread* get_thread(T* this);
    3232};
    3333
    34 #define DECL_THREAD(X) static inline thread_h* get_thread(X* this) { return &this->t; } void main(X* this);
     34#define DECL_THREAD(X) static inline thread* get_thread(X* this) { return &this->t; } void main(X* this);
    3535
    3636forall( dtype T | sized(T) | is_thread(T) )
     
    3939}
    4040
    41 static inline coroutine* get_coroutine(thread_h* this) {
     41static inline coroutine* get_coroutine(thread* this) {
    4242        return &this->c;
    4343}
    4444
    45 thread_h * this_thread(void);
     45thread * this_thread(void);
    4646
    4747//-----------------------------------------------------------------------------
    4848// Ctors and dtors
    49 void ?{}(thread_h* this);
    50 void ^?{}(thread_h* this);
     49void ?{}(thread* this);
     50void ^?{}(thread* this);
    5151
    5252//-----------------------------------------------------------------------------
     
    5454// Structure that actually start and stop threads
    5555forall( dtype T | sized(T) | is_thread(T) )
    56 struct thread {
     56struct scoped {
    5757        T handle;
    5858};
    5959
    6060forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T*); } )
    61 void ?{}( thread(T)* this );
     61void ?{}( scoped(T)* this );
    6262
    6363forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T*, P); } )
    64 void ?{}( thread(T)* this, P params );
     64void ?{}( scoped(T)* this, P params );
    6565
    6666forall( dtype T | sized(T) | is_thread(T) | { void ^?{}(T*); } )
    67 void ^?{}( thread(T)* this );
     67void ^?{}( scoped(T)* this );
    6868
    6969void yield();
Note: See TracChangeset for help on using the changeset viewer.