Changeset 10c071e in mainline for test/synch/semaphore1/test.c


Ignore:
Timestamp:
2005-12-15T16:57:48Z (19 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6c68b97
Parents:
b4cad8b2
Message:

Fix ia64 and sparc64 to compile with new atomic_t.
Fix rwlock test #5 and semaphore test #1 to compile with new atomic_t.

sparc64 work.
TBA must be set before a function call when MMU is switched off.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/synch/semaphore1/test.c

    rb4cad8b2 r10c071e  
    9090                thread_t *thrd;
    9191
    92                 items_produced = 0;
    93                 items_consumed = 0;
     92                atomic_set(&items_produced, 0);
     93                atomic_set(&items_consumed, 0);
    9494               
    9595                consumers = i * CONSUMERS;
     
    120120                waitq_wakeup(&can_start, WAKEUP_ALL);
    121121       
    122                 while (items_consumed != consumers || items_produced != producers) {
    123                         printf("%d consumers remaining, %d producers remaining\n", consumers - items_consumed, producers - items_produced);
     122                while (items_consumed.count != consumers || items_produced.count != producers) {
     123                        printf("%d consumers remaining, %d producers remaining\n", consumers - items_consumed.count, producers - items_produced.count);
    124124                        thread_sleep(1);
    125125                }
Note: See TracChangeset for help on using the changeset viewer.