Changes in kernel/test/synch/rcu1.c [11b285d:e90cfa6] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/rcu1.c
r11b285d re90cfa6 238 238 239 239 240 static atomic_t nop_callbacks_cnt = { 0 };240 static atomic_t nop_callbacks_cnt = 0; 241 241 /* Must be even. */ 242 242 static const int nop_updater_iters = 10000; … … 268 268 static bool do_nop_callbacks(void) 269 269 { 270 atomic_s et(&nop_callbacks_cnt, 0);270 atomic_store(&nop_callbacks_cnt, 0); 271 271 272 272 size_t exp_cnt = nop_updater_iters * get_thread_cnt(); … … 282 282 size_t loop_cnt = 0, max_loops = 15; 283 283 284 while (exp_cnt != atomic_ get(&nop_callbacks_cnt) && loop_cnt < max_loops) {284 while (exp_cnt != atomic_load(&nop_callbacks_cnt) && loop_cnt < max_loops) { 285 285 ++loop_cnt; 286 286 TPRINTF("."); … … 361 361 typedef struct { 362 362 rcu_item_t rcu; 363 atomic_count_t start_time;363 size_t start_time; 364 364 } seq_item_t; 365 365 … … 367 367 static errno_t seq_test_result = EOK; 368 368 369 static atomic_t cur_time = { 1 };370 static atomic_count_t max_upd_done_time = { 0 };369 static atomic_t cur_time = 1; 370 static size_t max_upd_done_time = { 0 }; 371 371 372 372 static void seq_cb(rcu_item_t *rcu_item) … … 399 399 for (size_t i = 0; i < work->read_cnt; ++i) { 400 400 rcu_read_lock(); 401 atomic_count_t start_time = atomic_postinc(&cur_time);401 size_t start_time = atomic_postinc(&cur_time); 402 402 403 403 for (volatile size_t d = 0; d < 10 * i; ++d) { … … 448 448 seq_test_result = EOK; 449 449 max_upd_done_time = 0; 450 atomic_s et(&cur_time, 1);450 atomic_store(&cur_time, 1); 451 451 452 452 const size_t iters = 100; … … 821 821 { 822 822 barrier_t *b = member_to_inst(item, barrier_t, rcu_item); 823 atomic_s et(&b->done, 1);823 atomic_store(&b->done, 1); 824 824 } 825 825 … … 835 835 } 836 836 837 atomic_s et(&barrier->done, 0);837 atomic_store(&barrier->done, 0); 838 838 839 839 rcu_call(&barrier->rcu_item, barrier_callback); 840 840 rcu_barrier(); 841 841 842 if (1 == atomic_ get(&barrier->done)) {842 if (1 == atomic_load(&barrier->done)) { 843 843 free(barrier); 844 844 return true;
Note:
See TracChangeset
for help on using the changeset viewer.