Changes in src/libcfa/concurrency/kernel.c [0c78741:5ea06d6]
- File:
-
- 1 edited
-
src/libcfa/concurrency/kernel.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/kernel.c
r0c78741 r5ea06d6 235 235 ScheduleThread( this->finish.thrd ); 236 236 } 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 }250 237 else { 251 238 assert(this->finish.action_code == No_Action); … … 348 335 this_processor->finish.lock = lock; 349 336 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;366 337 suspend(); 367 338 } … … 558 529 } 559 530 560 void ?{}( __ condition_stack_t * this ) {531 void ?{}( __thread_stack_t * this ) { 561 532 this->top = NULL; 562 533 } 563 534 564 void push( __ condition_stack_t * this, __condition_criterion_t* t ) {565 assert( !t->next);535 void push( __thread_stack_t * this, thread_desc * t ) { 536 assert(t->next != NULL); 566 537 t->next = this->top; 567 538 this->top = t; 568 539 } 569 540 570 __condition_criterion_t * pop( __condition_stack_t * this ) {571 __condition_criterion_t* top = this->top;541 thread_desc * pop( __thread_stack_t * this ) { 542 thread_desc * top = this->top; 572 543 if( top ) { 573 544 this->top = top->next;
Note:
See TracChangeset
for help on using the changeset viewer.