testing: ck_cohort validation

The ck_cohort validation test had an error that would cause an uneven distribution of threads among cohorts when the affinity delta was set above 1.
ck_pring
Brendon Scheinman 12 years ago
parent d5c05309b4
commit 59cc30b671

@ -62,7 +62,7 @@ thread(void *null CK_CC_UNUSED)
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
cohort = cohorts + core % n_cohorts; cohort = cohorts + (core / (int)ck_pr_load_uint(&a.delta)) % n_cohorts;
while (i--) { while (i--) {
ck_cohort_fas_fas_lock(cohort); ck_cohort_fas_fas_lock(cohort);

Loading…
Cancel
Save