Ignore:
File:
1 edited

Legend:

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

    r0c78741 r5ea06d6  
    235235                ScheduleThread( this->finish.thrd );
    236236        }
    237         else if( this->finish.action_code == Release_Multi ) {
    238                 for(int i = 0; i < this->finish.lock_count; i++) {
    239                         unlock( this->finish.locks[i] );
    240                 }
    241         }
    242         else if( this->finish.action_code == Release_Multi_Schedule ) {
    243                 for(int i = 0; i < this->finish.lock_count; i++) {
    244                         unlock( this->finish.locks[i] );
    245                 }
    246                 for(int i = 0; i < this->finish.thrd_count; i++) {
    247                         ScheduleThread( this->finish.thrds[i] );
    248                 }
    249         }
    250237        else {
    251238                assert(this->finish.action_code == No_Action);
     
    348335        this_processor->finish.lock = lock;
    349336        this_processor->finish.thrd = thrd;
    350         suspend();
    351 }
    352 
    353 void ScheduleInternal(spinlock ** locks, unsigned short count) {
    354         this_processor->finish.action_code = Release_Multi;
    355         this_processor->finish.locks = locks;
    356         this_processor->finish.lock_count = count;
    357         suspend();
    358 }
    359 
    360 void ScheduleInternal(spinlock ** locks, unsigned short lock_count, thread_desc ** thrds, unsigned short thrd_count) {
    361         this_processor->finish.action_code = Release_Multi_Schedule;
    362         this_processor->finish.locks = locks;
    363         this_processor->finish.lock_count = lock_count;
    364         this_processor->finish.thrds = thrds;
    365         this_processor->finish.thrd_count = thrd_count;
    366337        suspend();
    367338}
     
    558529}
    559530
    560 void ?{}( __condition_stack_t * this ) {
     531void ?{}( __thread_stack_t * this ) {
    561532        this->top = NULL;
    562533}
    563534
    564 void push( __condition_stack_t * this, __condition_criterion_t * t ) {
    565         assert( !t->next );
     535void push( __thread_stack_t * this, thread_desc * t ) {
     536        assert(t->next != NULL);
    566537        t->next = this->top;
    567538        this->top = t;
    568539}
    569540
    570 __condition_criterion_t * pop( __condition_stack_t * this ) {
    571         __condition_criterion_t * top = this->top;
     541thread_desc * pop( __thread_stack_t * this ) {
     542        thread_desc * top = this->top;
    572543        if( top ) {
    573544                this->top = top->next;
Note: See TracChangeset for help on using the changeset viewer.