Changeset 1433ecda in mainline for kernel/test/smpcall


Ignore:
Timestamp:
2018-04-04T15:42:37Z (8 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
2c4e1cc
Parents:
47b2d7e3
Message:

Fix cstyle: make ccheck-fix and commit only files where all the changes are good.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/smpcall/smpcall1.c

    r47b2d7e3 r1433ecda  
    5353        assert(interrupts_disabled());
    5454
    55         size_t *pcall_cnt = (size_t*)p;
     55        size_t *pcall_cnt = (size_t *)p;
    5656        /*
    5757         * No synchronization. Tests if smp_calls makes changes
     
    6464static void test_thread(void *p)
    6565{
    66         size_t *pcall_cnt = (size_t*)p;
     66        size_t *pcall_cnt = (size_t *)p;
    6767        smp_call_t call_info[MAX_CPUS];
    6868
     
    8484                 * same counter would clobber it without additional synchronization.
    8585                 */
    86                 size_t local_cnt[MAX_CPUS] = {0};
     86                size_t local_cnt[MAX_CPUS] = { 0 };
    8787
    8888                /* Now start asynchronous calls. */
     
    110110{
    111111        /* Number of received calls that were sent by cpu[i]. */
    112         size_t call_cnt[MAX_CPUS] = {0};
     112        size_t call_cnt[MAX_CPUS] = { 0 };
    113113        thread_t *thread[MAX_CPUS] = { NULL };
    114114
     
    121121        for (unsigned int id = 0; id < cpu_count; ++id) {
    122122                thread[id] = thread_create(test_thread, &call_cnt[id], TASK,
    123                         THREAD_FLAG_NONE, "smp-call-test");
     123                    THREAD_FLAG_NONE, "smp-call-test");
    124124
    125125                if (thread[id]) {
     
    135135
    136136        TPRINTF("Running %zu wired threads. Expecting %zu calls. Be patient.\n",
    137                 running_thread_cnt, exp_calls_sum);
     137            running_thread_cnt, exp_calls_sum);
    138138
    139139        for (unsigned int i = 0; i < cpu_count; ++i) {
     
    161161                                ok = false;
    162162                                TPRINTF("Error: %zu instead of %zu cpu%zu's calls were"
    163                                         " acknowledged.\n", call_cnt[i], exp_calls, i);
     163                                    " acknowledged.\n", call_cnt[i], exp_calls, i);
    164164                        }
    165165                }
     
    170170        if (calls_sum != exp_calls_sum) {
    171171                TPRINTF("Error: total acknowledged sum: %zu instead of %zu.\n",
    172                         calls_sum, exp_calls_sum);
     172                    calls_sum, exp_calls_sum);
    173173
    174174                ok = false;
     
    177177        if (ok) {
    178178                TPRINTF("Success: number of received smp_calls is as expected (%zu).\n",
    179                         exp_calls_sum);
     179                    exp_calls_sum);
    180180                return NULL;
    181181        } else
Note: See TracChangeset for help on using the changeset viewer.