Changeset 10c071e in mainline for test


Ignore:
Timestamp:
2005-12-15T16:57:48Z (20 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.

Location:
test/synch
Files:
2 edited

Legend:

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

    rb4cad8b2 r10c071e  
    8686                thread_t *thrd;
    8787
    88                 items_read = 0;
    89                 items_written = 0;
     88                atomic_set(&items_read, 0);
     89                atomic_set(&items_written, 0);
    9090
    9191                readers = i*READERS;
     
    116116                waitq_wakeup(&can_start, WAKEUP_ALL);
    117117       
    118                 while (items_read != readers || items_written != writers) {
    119                         printf("%d readers remaining, %d writers remaining, readers_in=%d\n", readers - items_read, writers - items_written, rwlock.readers_in);
     118                while (items_read.count != readers || items_written.count != writers) {
     119                        printf("%d readers remaining, %d writers remaining, readers_in=%d\n", readers - items_read.count, writers - items_written.count, rwlock.readers_in);
    120120                        thread_usleep(100000);
    121121                }
  • 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.