Changeset 3bacee1 in mainline for kernel/test/synch/workq-test-core.h
- Timestamp:
- 2018-04-12T16:27:17Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3cf22f9
- Parents:
- 76d0981d
- git-author:
- Jiri Svoboda <jiri@…> (2018-04-11 19:25:33)
- git-committer:
- Jiri Svoboda <jiri@…> (2018-04-12 16:27:17)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/workq-test-core.h
r76d0981d r3bacee1 67 67 { 68 68 unsigned n = (unsigned)num; 69 return (n != 0) && 0 == (n & (n -1));70 } 71 72 static test_work_t * 69 return (n != 0) && 0 == (n & (n - 1)); 70 } 71 72 static test_work_t *create_child(test_work_t *work) 73 73 { 74 74 test_work_t *child = malloc(sizeof(test_work_t), 0); … … 168 168 169 169 TPRINTF("waves: %d, count_down: %d, total expected calls: %zu\n", 170 170 WAVES, COUNT, exp_call_cnt * WAVES); 171 171 172 172 … … 179 179 180 180 for (int i = 0; i < WAVES; ++i) { 181 while (atomic_get(&call_cnt[i]) < exp_call_cnt 182 &&sleep_cnt < max_sleep_cnt) {181 while (atomic_get(&call_cnt[i]) < exp_call_cnt && 182 sleep_cnt < max_sleep_cnt) { 183 183 TPRINTF("."); 184 184 thread_usleep(MAIN_POLL_SLEEP_MS * 1000); … … 192 192 if (atomic_get(&call_cnt[i]) == exp_call_cnt) { 193 193 TPRINTF("Ok: %" PRIua " calls in wave %d, as expected.\n", 194 194 atomic_get(&call_cnt[i]), i); 195 195 } else { 196 196 success = false; 197 197 TPRINTF("Error: %" PRIua " calls in wave %d, but %zu expected.\n", 198 198 atomic_get(&call_cnt[i]), i, exp_call_cnt); 199 199 } 200 200 }
Note:
See TracChangeset
for help on using the changeset viewer.