Changeset 036e97c in mainline for kernel/test
- Timestamp:
- 2018-09-07T15:52:40Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e3306d04
- Parents:
- e9d2905
- Location:
- kernel/test
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/atomic/atomic1.c
re9d2905 r036e97c 37 37 38 38 atomic_set(&a, 10); 39 if (atomic_ get(&a) != 10)40 return "Failed atomic_set()/atomic_ get()";39 if (atomic_load(&a) != 10) 40 return "Failed atomic_set()/atomic_load()"; 41 41 42 42 if (atomic_postinc(&a) != 10) 43 43 return "Failed atomic_postinc()"; 44 if (atomic_ get(&a) != 11)45 return "Failed atomic_ get() after atomic_postinc()";44 if (atomic_load(&a) != 11) 45 return "Failed atomic_load() after atomic_postinc()"; 46 46 47 47 if (atomic_postdec(&a) != 11) 48 48 return "Failed atomic_postdec()"; 49 if (atomic_ get(&a) != 10)50 return "Failed atomic_ get() after atomic_postdec()";49 if (atomic_load(&a) != 10) 50 return "Failed atomic_load() after atomic_postdec()"; 51 51 52 52 if (atomic_preinc(&a) != 11) 53 53 return "Failed atomic_preinc()"; 54 if (atomic_ get(&a) != 11)55 return "Failed atomic_ get() after atomic_preinc()";54 if (atomic_load(&a) != 11) 55 return "Failed atomic_load() after atomic_preinc()"; 56 56 57 57 if (atomic_predec(&a) != 10) 58 58 return "Failed atomic_predec()"; 59 if (atomic_ get(&a) != 10)60 return "Failed atomic_ get() after atomic_predec()";59 if (atomic_load(&a) != 10) 60 return "Failed atomic_load() after atomic_predec()"; 61 61 62 62 return NULL; -
kernel/test/mm/falloc2.c
re9d2905 r036e97c 130 130 } 131 131 132 while (atomic_ get(&thread_count) > 0) {132 while (atomic_load(&thread_count) > 0) { 133 133 TPRINTF("Threads left: %zu\n", 134 atomic_ get(&thread_count));134 atomic_load(&thread_count)); 135 135 thread_sleep(1); 136 136 } 137 137 138 if (atomic_ get(&thread_fail) == 0)138 if (atomic_load(&thread_fail) == 0) 139 139 return NULL; 140 140 -
kernel/test/synch/rcu1.c
re9d2905 r036e97c 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("."); … … 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; -
kernel/test/synch/workq-test-core.h
re9d2905 r036e97c 179 179 180 180 for (int i = 0; i < WAVES; ++i) { 181 while (atomic_ get(&call_cnt[i]) < exp_call_cnt &&181 while (atomic_load(&call_cnt[i]) < exp_call_cnt && 182 182 sleep_cnt < max_sleep_cnt) { 183 183 TPRINTF("."); … … 190 190 191 191 for (int i = 0; i < WAVES; ++i) { 192 if (atomic_ get(&call_cnt[i]) == exp_call_cnt) {192 if (atomic_load(&call_cnt[i]) == exp_call_cnt) { 193 193 TPRINTF("Ok: %zu calls in wave %d, as expected.\n", 194 atomic_ get(&call_cnt[i]), i);194 atomic_load(&call_cnt[i]), i); 195 195 } else { 196 196 success = false; 197 197 TPRINTF("Error: %zu calls in wave %d, but %zu expected.\n", 198 atomic_ get(&call_cnt[i]), i, exp_call_cnt);198 atomic_load(&call_cnt[i]), i, exp_call_cnt); 199 199 } 200 200 } -
kernel/test/thread/thread1.c
re9d2905 r036e97c 46 46 thread_detach(THREAD); 47 47 48 while (atomic_ get(&finish)) {48 while (atomic_load(&finish)) { 49 49 TPRINTF("%" PRIu64 " ", THREAD->tid); 50 50 thread_usleep(100000); … … 76 76 77 77 atomic_set(&finish, 0); 78 while (atomic_ get(&threads_finished) < total) {79 TPRINTF("Threads left: %zu\n", total - atomic_ get(&threads_finished));78 while (atomic_load(&threads_finished) < total) { 79 TPRINTF("Threads left: %zu\n", total - atomic_load(&threads_finished)); 80 80 thread_sleep(1); 81 81 }
Note:
See TracChangeset
for help on using the changeset viewer.