Changes in src/libcfa/concurrency/thread.c [c2b9f21:65deb18]
- File:
-
- 1 edited
-
src/libcfa/concurrency/thread.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/thread.c
rc2b9f21 r65deb18 31 31 // Thread ctors and dtors 32 32 33 void ?{}(thread_desc& this) {34 (this.self_cor){};35 this.self_cor.name = "Anonymous Coroutine";36 this.self_mon.owner = &this;37 this.self_mon.recursion = 1;38 this.self_mon_p = &this.self_mon;39 this.next = NULL;33 void ?{}(thread_desc& this) with( this ) { 34 self_cor{}; 35 self_cor.name = "Anonymous Coroutine"; 36 self_mon.owner = &this; 37 self_mon.recursion = 1; 38 self_mon_p = &self_mon; 39 next = NULL; 40 40 41 (this.monitors){ &this.self_mon_p, 1, (fptr_t)0 };41 monitors{ &self_mon_p, 1, (fptr_t)0 }; 42 42 } 43 43 44 void ^?{}(thread_desc& this) {45 ^ (this.self_cor){};44 void ^?{}(thread_desc& this) with( this ) { 45 ^self_cor{}; 46 46 } 47 47 48 48 forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T&); } ) 49 void ?{}( scoped(T)& this ) {50 (this.handle){};51 __thrd_start( this.handle);49 void ?{}( scoped(T)& this ) with( this ) { 50 handle{}; 51 __thrd_start(handle); 52 52 } 53 53 54 54 forall( dtype T, ttype P | sized(T) | is_thread(T) | { void ?{}(T&, P); } ) 55 void ?{}( scoped(T)& this, P params ) {56 (this.handle){ params };57 __thrd_start( this.handle);55 void ?{}( scoped(T)& this, P params ) with( this ) { 56 handle{ params }; 57 __thrd_start(handle); 58 58 } 59 59 60 60 forall( dtype T | sized(T) | is_thread(T) ) 61 void ^?{}( scoped(T)& this ) {62 ^ (this.handle){};61 void ^?{}( scoped(T)& this ) with( this ) { 62 ^handle{}; 63 63 } 64 64 … … 68 68 void __thrd_start( T& this ) { 69 69 coroutine_desc* thrd_c = get_coroutine(this); 70 thread_desc *thrd_h = get_thread (this);70 thread_desc * thrd_h = get_thread (this); 71 71 thrd_c->last = this_coroutine; 72 72
Note:
See TracChangeset
for help on using the changeset viewer.