Changeset a017ee7 for libcfa/src/concurrency/kernel/startup.cfa
- Timestamp:
- Apr 15, 2021, 11:45:44 AM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- a4b0aa4
- Parents:
- fc59b580
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/startup.cfa
rfc59b580 ra017ee7 469 469 this.name = name; 470 470 this.cltr = &_cltr; 471 this.cltr_id = -1u; 471 472 do_terminate = false; 472 473 preemption_alarm = 0p; … … 491 492 // Register and Lock the RWlock so no-one pushes/pops while we are changing the queue 492 493 uint_fast32_t last_size = ready_mutate_register((__processor_id_t*)&this); 493 int target =this.cltr->procs.total += 1u;494 this.cltr->procs.total += 1u; 494 495 insert_last(this.cltr->procs.actives, this); 495 496 496 497 // Adjust the ready queue size 497 this.cltr_id = ready_queue_grow( cltr, target);498 ready_queue_grow( cltr ); 498 499 499 500 // Unlock the RWlock … … 507 508 // Lock the RWlock so no-one pushes/pops while we are changing the queue 508 509 uint_fast32_t last_size = ready_mutate_lock(); 509 int target =this.cltr->procs.total -= 1u;510 this.cltr->procs.total -= 1u; 510 511 remove(this); 511 512 512 513 // Adjust the ready queue size 513 ready_queue_shrink( this.cltr , target);514 ready_queue_shrink( this.cltr ); 514 515 515 516 // Unlock the RWlock and unregister: we don't need the read_lock any more … … 586 587 587 588 // Adjust the ready queue size 588 ready_queue_grow( &this , 0);589 ready_queue_grow( &this ); 589 590 590 591 // Unlock the RWlock … … 601 602 602 603 // Adjust the ready queue size 603 ready_queue_shrink( &this , 0);604 ready_queue_shrink( &this ); 604 605 605 606 // Unlock the RWlock
Note: See TracChangeset
for help on using the changeset viewer.