Changeset c2efbb4 in mainline for kernel/test/thread/thread1.c


Ignore:
Timestamp:
2010-02-20T20:54:53Z (14 years ago)
Author:
Pavel Rimsky <pavel@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
721d4e85, 95c4776
Parents:
f516bc2 (diff), b03a666 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Synchronize with head.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/test/thread/thread1.c

    rf516bc2 rc2efbb4  
    5555char *test_thread1(void)
    5656{
    57         unsigned int i, total = 0;
     57        unsigned int i;
     58        atomic_count_t total = 0;
    5859       
    5960        atomic_set(&finish, 1);
    6061        atomic_set(&threads_finished, 0);
    6162       
    62         for (i = 0; i < THREADS; i++) { 
     63        for (i = 0; i < THREADS; i++) {
    6364                thread_t *t;
    6465                if (!(t = thread_create(threadtest, NULL, TASK, 0, "threadtest", false))) {
     
    7475       
    7576        atomic_set(&finish, 0);
    76         while (atomic_get(&threads_finished) < ((long) total)) {
     77        while (atomic_get(&threads_finished) < total) {
    7778                TPRINTF("Threads left: %d\n", total - atomic_get(&threads_finished));
    7879                thread_sleep(1);
Note: See TracChangeset for help on using the changeset viewer.