Ignore:
Timestamp:
Mar 31, 2017, 1:04:21 PM (7 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:
23063ea
Parents:
78d3dd5
Message:

Prototype of multi monitor internal scheduling

File:
1 edited

Legend:

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

    r78d3dd5 r5ea06d6  
    475475
    476476void ?{}( signal_once * this ) {
    477         this->condition = false;
     477        this->cond = false;
    478478}
    479479void ^?{}( signal_once * this ) {
     
    483483void wait( signal_once * this ) {
    484484        lock( &this->lock );
    485         if( !this->condition ) {
     485        if( !this->cond ) {
    486486                append( &this->blocked, this_thread() );
    487487                ScheduleInternal( &this->lock );
     
    494494        lock( &this->lock );
    495495        {
    496                 this->condition = true;
     496                this->cond = true;
    497497
    498498                thread_desc * it;
     
    506506//-----------------------------------------------------------------------------
    507507// Queues
    508 void ?{}( simple_thread_list * this ) {
     508void ?{}( __thread_queue_t * this ) {
    509509        this->head = NULL;
    510510        this->tail = &this->head;
    511511}
    512512
    513 void append( simple_thread_list * this, thread_desc * t ) {
     513void append( __thread_queue_t * this, thread_desc * t ) {
    514514        assert(this->tail != NULL);
    515515        *this->tail = t;
     
    517517}
    518518
    519 thread_desc * pop_head( simple_thread_list * this ) {
     519thread_desc * pop_head( __thread_queue_t * this ) {
    520520        thread_desc * head = this->head;
    521521        if( head ) {
     
    529529}
    530530
    531 void ?{}( simple_thread_stack * this ) {
     531void ?{}( __thread_stack_t * this ) {
    532532        this->top = NULL;
    533533}
    534534
    535 void push( simple_thread_stack * this, thread_desc * t ) {
     535void push( __thread_stack_t * this, thread_desc * t ) {
    536536        assert(t->next != NULL);
    537537        t->next = this->top;
     
    539539}
    540540
    541 thread_desc * pop( simple_thread_stack * this ) {
     541thread_desc * pop( __thread_stack_t * this ) {
    542542        thread_desc * top = this->top;
    543543        if( top ) {
Note: See TracChangeset for help on using the changeset viewer.