Ignore:
Timestamp:
Jan 31, 2018, 5:50:34 PM (4 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
295e5071
Parents:
bc6f918 (diff), 281806b (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc

File:
1 edited

Legend:

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

    rbc6f918 re2e7330  
    3131// Thread ctors and dtors
    3232
    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;
     33void ?{}(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        __cfaabi_dbg_debug_do(
     41                dbg_next = NULL;
     42                dbg_prev = NULL;
     43                __cfaabi_dbg_thread_register(&this);
     44        )
    4045
    41         (this.monitors){ &this.self_mon_p, 1, (fptr_t)0 };
     46        monitors{ &self_mon_p, 1, (fptr_t)0 };
    4247}
    4348
    44 void ^?{}(thread_desc& this) {
    45         ^(this.self_cor){};
     49void ^?{}(thread_desc& this) with( this ) {
     50        ^self_cor{};
    4651}
    4752
    4853forall( dtype T | sized(T) | is_thread(T) | { void ?{}(T&); } )
    49 void ?{}( scoped(T)& this ) {
    50         (this.handle){};
    51         __thrd_start(this.handle);
     54void ?{}( scoped(T)& this ) with( this ) {
     55        handle{};
     56        __thrd_start(handle);
    5257}
    5358
    5459forall( 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);
     60void ?{}( scoped(T)& this, P params ) with( this ) {
     61        handle{ params };
     62        __thrd_start(handle);
    5863}
    5964
    6065forall( dtype T | sized(T) | is_thread(T) )
    61 void ^?{}( scoped(T)& this ) {
    62         ^(this.handle){};
     66void ^?{}( scoped(T)& this ) with( this ) {
     67        ^handle{};
    6368}
    6469
     
    6873void __thrd_start( T& this ) {
    6974        coroutine_desc* thrd_c = get_coroutine(this);
    70         thread_desc* thrd_h = get_thread   (this);
     75        thread_desc   * thrd_h = get_thread   (this);
    7176        thrd_c->last = this_coroutine;
    7277
Note: See TracChangeset for help on using the changeset viewer.