Ignore:
File:
1 edited

Legend:

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

    ra35b458 r3cfe2b8  
    7373{
    7474        int i, j, k;
    75         atomic_count_t consumers;
    76         atomic_count_t producers;
     75        size_t consumers;
     76        size_t producers;
    7777
    7878        waitq_initialize(&can_start);
     
    8282                thread_t *thrd;
    8383
    84                 atomic_set(&items_produced, 0);
    85                 atomic_set(&items_consumed, 0);
     84                atomic_store(&items_produced, 0);
     85                atomic_store(&items_consumed, 0);
    8686
    8787                consumers = i * CONSUMERS;
    8888                producers = (4 - i) * PRODUCERS;
    8989
    90                 TPRINTF("Creating %" PRIua " consumers and %" PRIua " producers...",
     90                TPRINTF("Creating %zu consumers and %zu producers...",
    9191                    consumers, producers);
    9292
     
    115115                waitq_wakeup(&can_start, WAKEUP_ALL);
    116116
    117                 while ((items_consumed.count != consumers) || (items_produced.count != producers)) {
    118                         TPRINTF("%" PRIua " consumers remaining, %" PRIua " producers remaining\n",
    119                             consumers - items_consumed.count, producers - items_produced.count);
     117                while ((items_consumed != consumers) || (items_produced != producers)) {
     118                        TPRINTF("%zu consumers remaining, %zu producers remaining\n",
     119                            consumers - items_consumed, producers - items_produced);
    120120                        thread_sleep(1);
    121121                }
Note: See TracChangeset for help on using the changeset viewer.