Changeset bd4d011 for src/libcfa
- Timestamp:
- Mar 23, 2017, 3:05:36 PM (7 years ago)
- 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:
- ae6f1ec
- Parents:
- bcda04c
- Location:
- src/libcfa/concurrency
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/thread
rbcda04c rbd4d011 56 56 thread_desc * this_thread(void); 57 57 58 forall( dtype T | is_thread(T) ) 59 void __thrd_start( T* this ); 60 58 61 //----------------------------------------------------------------------------- 59 62 // Ctors and dtors -
src/libcfa/concurrency/thread.c
rbcda04c rbd4d011 31 31 32 32 //----------------------------------------------------------------------------- 33 // Forward declarations34 forall( dtype T | is_thread(T) )35 void start( T* this );36 37 //-----------------------------------------------------------------------------38 33 // Thread ctors and dtors 39 34 … … 53 48 void ?{}( scoped(T)* this ) { 54 49 (&this->handle){}; 55 start(&this->handle);50 __thrd_start(&this->handle); 56 51 } 57 52 … … 59 54 void ?{}( scoped(T)* this, P params ) { 60 55 (&this->handle){ params }; 61 start(&this->handle);56 __thrd_start(&this->handle); 62 57 } 63 58 … … 70 65 // Starting and stopping threads 71 66 forall( dtype T | is_thread(T) ) 72 void start( T* this ) {67 void __thrd_start( T* this ) { 73 68 coroutine_desc* thrd_c = get_coroutine(this); 74 69 thread_desc* thrd_h = get_thread (this);
Note: See TracChangeset
for help on using the changeset viewer.