Changeset aab5e46 in mainline for kernel/test/mm/falloc2.c


Ignore:
Timestamp:
2018-11-03T23:32:39Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
790f3a3
Parents:
ef1eab7
Message:

Thread and task iterator functions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/mm/falloc2.c

    ref1eab7 raab5e46  
    4343#define THREADS      8
    4444
    45 static atomic_t thread_count;
     45static atomic_t thread_cnt;
    4646static atomic_t thread_fail;
    4747
     
    5656                    "Unable to allocate frames\n", THREAD->tid, CPU->id);
    5757                atomic_inc(&thread_fail);
    58                 atomic_dec(&thread_count);
     58                atomic_dec(&thread_cnt);
    5959                return;
    6060        }
     
    110110        TPRINTF("Thread #%" PRIu64 " (cpu%u): Exiting\n",
    111111            THREAD->tid, CPU->id);
    112         atomic_dec(&thread_count);
     112        atomic_dec(&thread_cnt);
    113113}
    114114
    115115const char *test_falloc2(void)
    116116{
    117         atomic_store(&thread_count, THREADS);
     117        atomic_store(&thread_cnt, THREADS);
    118118        atomic_store(&thread_fail, 0);
    119119
     
    128128        }
    129129
    130         while (atomic_load(&thread_count) > 0) {
     130        while (atomic_load(&thread_cnt) > 0) {
    131131                TPRINTF("Threads left: %zu\n",
    132                     atomic_load(&thread_count));
     132                    atomic_load(&thread_cnt));
    133133                thread_sleep(1);
    134134        }
Note: See TracChangeset for help on using the changeset viewer.