Changeset ca0c311 for libcfa/src/concurrency
- Timestamp:
- Jun 19, 2023, 1:54:34 PM (19 months ago)
- Branches:
- master
- Children:
- e39cfb9
- Parents:
- dc136d7
- Location:
- libcfa/src/concurrency
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel.hfa
rdc136d7 rca0c311 195 195 // Total number of processors 196 196 unsigned total; 197 198 // Number of processors constructed 199 // incremented at construction time, total is incremented once the processor asyncronously registers 200 unsigned constructed; 197 201 198 202 // Total number of idle processors … … 297 301 static inline struct cluster * active_cluster () { return publicTLS_get( this_processor )->cltr; } 298 302 303 // gets the number of constructed processors on the cluster 304 static inline unsigned get_proc_count( cluster & this ) { return this.procs.constructed; } 305 299 306 // set the number of internal processors 300 307 // these processors are in addition to any explicitly declared processors -
libcfa/src/concurrency/kernel/startup.cfa
rdc136d7 rca0c311 528 528 this.name = name; 529 529 this.cltr = &_cltr; 530 __atomic_add_fetch( &_cltr.procs.constructed, 1u, __ATOMIC_RELAXED ); 530 531 this.rdq.its = 0; 531 532 this.rdq.itr = 0; … … 595 596 __cfadbg_print_safe(runtime_core, "Kernel : core %p signaling termination\n", &this); 596 597 598 __atomic_sub_fetch( &this.cltr->procs.constructed, 1u, __ATOMIC_RELAXED ); 599 597 600 __atomic_store_n(&do_terminate, true, __ATOMIC_RELAXED); 598 601 __disable_interrupts_checked(); … … 615 618 this.fdw = 0p; 616 619 this.idle = 0; 620 this.constructed = 0; 617 621 this.total = 0; 618 622 }
Note: See TracChangeset
for help on using the changeset viewer.