Ignore:
Timestamp:
Jan 25, 2018, 1:00:06 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
6e0f4bd
Parents:
81e1f32
Message:

Added doubly-linked list of existing threads

File:
1 edited

Legend:

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

    r81e1f32 rf7d6bb0  
    3333void ?{}(thread_desc& this) {
    3434        (this.self_cor){};
    35         this.self_cor.name = "Anonymous Coroutine";
     35        this.self_cor.name = "Anonymous Thread";
    3636        this.self_mon.owner = &this;
    3737        this.self_mon.recursion = 1;
    3838        this.self_mon_p = &this.self_mon;
    3939        this.next = NULL;
     40        __cfaabi_dbg_debug_do(
     41                this.dbg_next = NULL;
     42                this.dbg_prev = NULL;
     43                __cfaabi_dbg_thread_register(&this);
     44        )
    4045
    4146        (this.monitors){ &this.self_mon_p, 1, (fptr_t)0 };
     
    4348
    4449void ^?{}(thread_desc& this) {
     50        __cfaabi_dbg_debug_do(
     51                __cfaabi_dbg_thread_unregister(&this);
     52        )
    4553        ^(this.self_cor){};
    4654}
Note: See TracChangeset for help on using the changeset viewer.