Changeset 5ea06d6 for src/libcfa/concurrency/kernel.c
- Timestamp:
- Mar 31, 2017, 1:04:21 PM (7 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/kernel.c
r78d3dd5 r5ea06d6 475 475 476 476 void ?{}( signal_once * this ) { 477 this->cond ition= false;477 this->cond = false; 478 478 } 479 479 void ^?{}( signal_once * this ) { … … 483 483 void wait( signal_once * this ) { 484 484 lock( &this->lock ); 485 if( !this->cond ition) {485 if( !this->cond ) { 486 486 append( &this->blocked, this_thread() ); 487 487 ScheduleInternal( &this->lock ); … … 494 494 lock( &this->lock ); 495 495 { 496 this->cond ition= true;496 this->cond = true; 497 497 498 498 thread_desc * it; … … 506 506 //----------------------------------------------------------------------------- 507 507 // Queues 508 void ?{}( simple_thread_list * this ) {508 void ?{}( __thread_queue_t * this ) { 509 509 this->head = NULL; 510 510 this->tail = &this->head; 511 511 } 512 512 513 void append( simple_thread_list * this, thread_desc * t ) {513 void append( __thread_queue_t * this, thread_desc * t ) { 514 514 assert(this->tail != NULL); 515 515 *this->tail = t; … … 517 517 } 518 518 519 thread_desc * pop_head( simple_thread_list * this ) {519 thread_desc * pop_head( __thread_queue_t * this ) { 520 520 thread_desc * head = this->head; 521 521 if( head ) { … … 529 529 } 530 530 531 void ?{}( simple_thread_stack* this ) {531 void ?{}( __thread_stack_t * this ) { 532 532 this->top = NULL; 533 533 } 534 534 535 void push( simple_thread_stack* this, thread_desc * t ) {535 void push( __thread_stack_t * this, thread_desc * t ) { 536 536 assert(t->next != NULL); 537 537 t->next = this->top; … … 539 539 } 540 540 541 thread_desc * pop( simple_thread_stack* this ) {541 thread_desc * pop( __thread_stack_t * this ) { 542 542 thread_desc * top = this->top; 543 543 if( top ) {
Note: See TracChangeset
for help on using the changeset viewer.