Changes in kernel/test/synch/semaphore1.c [a35b458:3cfe2b8] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/synch/semaphore1.c
ra35b458 r3cfe2b8 73 73 { 74 74 int i, j, k; 75 atomic_count_t consumers;76 atomic_count_t producers;75 size_t consumers; 76 size_t producers; 77 77 78 78 waitq_initialize(&can_start); … … 82 82 thread_t *thrd; 83 83 84 atomic_s et(&items_produced, 0);85 atomic_s et(&items_consumed, 0);84 atomic_store(&items_produced, 0); 85 atomic_store(&items_consumed, 0); 86 86 87 87 consumers = i * CONSUMERS; 88 88 producers = (4 - i) * PRODUCERS; 89 89 90 TPRINTF("Creating % " PRIua " consumers and %" PRIua "producers...",90 TPRINTF("Creating %zu consumers and %zu producers...", 91 91 consumers, producers); 92 92 … … 115 115 waitq_wakeup(&can_start, WAKEUP_ALL); 116 116 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); 120 120 thread_sleep(1); 121 121 }
Note:
See TracChangeset
for help on using the changeset viewer.