diff --git a/regressions/ck_spinlock/validate/validate.h b/regressions/ck_spinlock/validate/validate.h index 58ae3f7..df40584 100644 --- a/regressions/ck_spinlock/validate/validate.h +++ b/regressions/ck_spinlock/validate/validate.h @@ -87,16 +87,16 @@ thread(void *null CK_CC_UNUSED) ck_error("is_locked operation failed."); #endif - ck_pr_inc_uint(&locked); - ck_pr_inc_uint(&locked); - ck_pr_inc_uint(&locked); - ck_pr_inc_uint(&locked); - ck_pr_inc_uint(&locked); - ck_pr_inc_uint(&locked); - ck_pr_inc_uint(&locked); - ck_pr_inc_uint(&locked); - ck_pr_inc_uint(&locked); - ck_pr_inc_uint(&locked); + ck_pr_store_uint(&locked, locked + 1); + ck_pr_store_uint(&locked, locked + 1); + ck_pr_store_uint(&locked, locked + 1); + ck_pr_store_uint(&locked, locked + 1); + ck_pr_store_uint(&locked, locked + 1); + ck_pr_store_uint(&locked, locked + 1); + ck_pr_store_uint(&locked, locked + 1); + ck_pr_store_uint(&locked, locked + 1); + ck_pr_store_uint(&locked, locked + 1); + ck_pr_store_uint(&locked, locked + 1); j = ck_pr_load_uint(&locked); @@ -105,19 +105,18 @@ thread(void *null CK_CC_UNUSED) exit(EXIT_FAILURE); } - ck_pr_dec_uint(&locked); - ck_pr_dec_uint(&locked); - ck_pr_dec_uint(&locked); - ck_pr_dec_uint(&locked); - ck_pr_dec_uint(&locked); - ck_pr_dec_uint(&locked); - ck_pr_dec_uint(&locked); - ck_pr_dec_uint(&locked); - ck_pr_dec_uint(&locked); - ck_pr_dec_uint(&locked); + ck_pr_store_uint(&locked, locked - 1); + ck_pr_store_uint(&locked, locked - 1); + ck_pr_store_uint(&locked, locked - 1); + ck_pr_store_uint(&locked, locked - 1); + ck_pr_store_uint(&locked, locked - 1); + ck_pr_store_uint(&locked, locked - 1); + ck_pr_store_uint(&locked, locked - 1); + ck_pr_store_uint(&locked, locked - 1); + ck_pr_store_uint(&locked, locked - 1); + ck_pr_store_uint(&locked, locked - 1); UNLOCK; - LOCK; j = ck_pr_load_uint(&locked);