Changeset 3bacee1 in mainline for kernel/test/synch/workq-test-core.h


Ignore:
Timestamp:
2018-04-12T16:27:17Z (6 years ago)
Author:
Jiri Svoboda <jiri@…>
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)
Message:

Make ccheck-fix again and commit more good files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/synch/workq-test-core.h

    r76d0981d r3bacee1  
    6767{
    6868        unsigned n = (unsigned)num;
    69         return (n != 0) && 0 == (n & (n-1));
    70 }
    71 
    72 static test_work_t * create_child(test_work_t *work)
     69        return (n != 0) && 0 == (n & (n - 1));
     70}
     71
     72static test_work_t *create_child(test_work_t *work)
    7373{
    7474        test_work_t *child = malloc(sizeof(test_work_t), 0);
     
    168168
    169169        TPRINTF("waves: %d, count_down: %d, total expected calls: %zu\n",
    170                 WAVES, COUNT, exp_call_cnt * WAVES);
     170            WAVES, COUNT, exp_call_cnt * WAVES);
    171171
    172172
     
    179179
    180180        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) {
    183183                        TPRINTF(".");
    184184                        thread_usleep(MAIN_POLL_SLEEP_MS * 1000);
     
    192192                if (atomic_get(&call_cnt[i]) == exp_call_cnt) {
    193193                        TPRINTF("Ok: %" PRIua " calls in wave %d, as expected.\n",
    194                                 atomic_get(&call_cnt[i]), i);
     194                            atomic_get(&call_cnt[i]), i);
    195195                } else {
    196196                        success = false;
    197197                        TPRINTF("Error: %" PRIua " calls in wave %d, but %zu expected.\n",
    198                                 atomic_get(&call_cnt[i]), i, exp_call_cnt);
     198                            atomic_get(&call_cnt[i]), i, exp_call_cnt);
    199199                }
    200200        }
Note: See TracChangeset for help on using the changeset viewer.