/trunk/kernel/test/synch/rwlock3.c |
---|
45,14 → 45,14 |
thread_detach(THREAD); |
if (!sh_quiet) |
printf("cpu%d, tid %d: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu: trying to lock rwlock for reading....\n", CPU->id, THREAD->tid); |
rwlock_read_lock(&rwlock); |
rwlock_read_unlock(&rwlock); |
if (!sh_quiet) { |
printf("cpu%d, tid %d: success\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %d: trying to lock rwlock for writing....\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu: success\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu: trying to lock rwlock for writing....\n", CPU->id, THREAD->tid); |
} |
rwlock_write_lock(&rwlock); |
59,7 → 59,7 |
rwlock_write_unlock(&rwlock); |
if (!sh_quiet) |
printf("cpu%d, tid %d: success\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu: success\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
} |
/trunk/kernel/test/synch/rwlock4.c |
---|
74,18 → 74,18 |
to = random(40000); |
if (!sh_quiet) |
printf("cpu%d, tid %d w+ (%d)\n", CPU->id, THREAD->tid, to); |
printf("cpu%d, tid %llu w+ (%d)\n", CPU->id, THREAD->tid, to); |
rc = rwlock_write_lock_timeout(&rwlock, to); |
if (SYNCH_FAILED(rc)) { |
if (!sh_quiet) |
printf("cpu%d, tid %d w!\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu w!\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
return; |
} |
if (!sh_quiet) |
printf("cpu%d, tid %d w=\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu w=\n", CPU->id, THREAD->tid); |
if (rwlock.readers_in) { |
if (!sh_quiet) |
106,7 → 106,7 |
rwlock_write_unlock(&rwlock); |
if (!sh_quiet) |
printf("cpu%d, tid %d w-\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu w-\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
} |
119,24 → 119,24 |
to = random(2000); |
if (!sh_quiet) |
printf("cpu%d, tid %d r+ (%d)\n", CPU->id, THREAD->tid, to); |
printf("cpu%d, tid %llu r+ (%d)\n", CPU->id, THREAD->tid, to); |
rc = rwlock_read_lock_timeout(&rwlock, to); |
if (SYNCH_FAILED(rc)) { |
if (!sh_quiet) |
printf("cpu%d, tid %d r!\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu r!\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
return; |
} |
if (!sh_quiet) |
printf("cpu%d, tid %d r=\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu r=\n", CPU->id, THREAD->tid); |
thread_usleep(30000); |
rwlock_read_unlock(&rwlock); |
if (!sh_quiet) |
printf("cpu%d, tid %d r-\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu r-\n", CPU->id, THREAD->tid); |
atomic_dec(&thread_count); |
} |
/trunk/kernel/test/synch/semaphore2.c |
---|
67,18 → 67,18 |
waitq_sleep(&can_start); |
to = random(20000); |
printf("cpu%d, tid %d down+ (%d)\n", CPU->id, THREAD->tid, to); |
printf("cpu%d, tid %llu down+ (%d)\n", CPU->id, THREAD->tid, to); |
rc = semaphore_down_timeout(&sem, to); |
if (SYNCH_FAILED(rc)) { |
printf("cpu%d, tid %d down!\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu down!\n", CPU->id, THREAD->tid); |
return; |
} |
printf("cpu%d, tid %d down=\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu down=\n", CPU->id, THREAD->tid); |
thread_usleep(random(30000)); |
semaphore_up(&sem); |
printf("cpu%d, tid %d up\n", CPU->id, THREAD->tid); |
printf("cpu%d, tid %llu up\n", CPU->id, THREAD->tid); |
} |
char * test_semaphore2(bool quiet) |
/trunk/kernel/test/thread/thread1.c |
---|
48,7 → 48,7 |
while (atomic_get(&finish)) { |
if (!sh_quiet) |
printf("%d ", (int) (THREAD->tid)); |
printf("%llu ", THREAD->tid); |
thread_usleep(100000); |
} |
atomic_inc(&threads_finished); |
/trunk/kernel/test/mm/falloc2.c |
---|
58,7 → 58,7 |
uintptr_t * frames = (uintptr_t *) malloc(MAX_FRAMES * sizeof(uintptr_t), FRAME_ATOMIC); |
if (frames == NULL) { |
if (!sh_quiet) |
printf("Thread #%d (cpu%d): Unable to allocate frames\n", THREAD->tid, CPU->id); |
printf("Thread #%llu (cpu%d): Unable to allocate frames\n", THREAD->tid, CPU->id); |
atomic_inc(&thread_fail); |
atomic_dec(&thread_count); |
return; |
69,7 → 69,7 |
for (run = 0; run < THREAD_RUNS; run++) { |
for (order = 0; order <= MAX_ORDER; order++) { |
if (!sh_quiet) |
printf("Thread #%d (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order); |
printf("Thread #%llu (cpu%d): Allocating %d frames blocks ... \n", THREAD->tid, CPU->id, 1 << order); |
allocated = 0; |
for (i = 0; i < (MAX_FRAMES >> order); i++) { |
82,16 → 82,16 |
} |
if (!sh_quiet) |
printf("Thread #%d (cpu%d): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated); |
printf("Thread #%llu (cpu%d): %d blocks allocated.\n", THREAD->tid, CPU->id, allocated); |
if (!sh_quiet) |
printf("Thread #%d (cpu%d): Deallocating ... \n", THREAD->tid, CPU->id); |
printf("Thread #%llu (cpu%d): Deallocating ... \n", THREAD->tid, CPU->id); |
for (i = 0; i < allocated; i++) { |
for (k = 0; k <= ((FRAME_SIZE << order) - 1); k++) { |
if (((uint8_t *) frames[i])[k] != val) { |
if (!sh_quiet) |
printf("Thread #%d (cpu%d): Unexpected data (%d) in block %p offset %#zx\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); |
printf("Thread #%llu (cpu%d): Unexpected data (%d) in block %p offset %#zx\n", THREAD->tid, CPU->id, ((char *) frames[i])[k], frames[i], k); |
atomic_inc(&thread_fail); |
goto cleanup; |
} |
100,7 → 100,7 |
} |
if (!sh_quiet) |
printf("Thread #%d (cpu%d): Finished run.\n", THREAD->tid, CPU->id); |
printf("Thread #%llu (cpu%d): Finished run.\n", THREAD->tid, CPU->id); |
} |
} |
108,7 → 108,7 |
free(frames); |
if (!sh_quiet) |
printf("Thread #%d (cpu%d): Exiting\n", THREAD->tid, CPU->id); |
printf("Thread #%llu (cpu%d): Exiting\n", THREAD->tid, CPU->id); |
atomic_dec(&thread_count); |
} |
/trunk/kernel/test/mm/slab1.c |
---|
137,7 → 137,7 |
thread_detach(THREAD); |
if (!sh_quiet) |
printf("Starting thread #%d...\n", THREAD->tid); |
printf("Starting thread #%llu...\n", THREAD->tid); |
for (j = 0; j < 10; j++) { |
for (i = 0; i < THR_MEM_COUNT; i++) |
151,7 → 151,7 |
} |
if (!sh_quiet) |
printf("Thread #%d finished\n", THREAD->tid); |
printf("Thread #%llu finished\n", THREAD->tid); |
semaphore_up(&thr_sem); |
} |
/trunk/kernel/test/mm/slab2.c |
---|
150,11 → 150,11 |
mutex_unlock(&starter_mutex); |
if (!sh_quiet) |
printf("Starting thread #%d...\n",THREAD->tid); |
printf("Starting thread #%llu...\n",THREAD->tid); |
/* Alloc all */ |
if (!sh_quiet) |
printf("Thread #%d allocating...\n", THREAD->tid); |
printf("Thread #%llu allocating...\n", THREAD->tid); |
while (1) { |
/* Call with atomic to detect end of memory */ |
166,7 → 166,7 |
} |
if (!sh_quiet) |
printf("Thread #%d releasing...\n", THREAD->tid); |
printf("Thread #%llu releasing...\n", THREAD->tid); |
while (data) { |
new = *((void **)data); |
176,7 → 176,7 |
} |
if (!sh_quiet) |
printf("Thread #%d allocating...\n", THREAD->tid); |
printf("Thread #%llu allocating...\n", THREAD->tid); |
while (1) { |
/* Call with atomic to detect end of memory */ |
188,7 → 188,7 |
} |
if (!sh_quiet) |
printf("Thread #%d releasing...\n", THREAD->tid); |
printf("Thread #%llu releasing...\n", THREAD->tid); |
while (data) { |
new = *((void **)data); |
198,7 → 198,7 |
} |
if (!sh_quiet) |
printf("Thread #%d finished\n", THREAD->tid); |
printf("Thread #%llu finished\n", THREAD->tid); |
slab_print_list(); |
semaphore_up(&thr_sem); |
/trunk/kernel/test/fpu/mips2.c |
---|
72,7 → 72,7 |
if (arg != after_arg) { |
if (!sh_quiet) |
printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
printf("General reg tid%llu: arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
atomic_inc(&threads_fault); |
break; |
} |
104,7 → 104,7 |
if (arg != after_arg) { |
if (!sh_quiet) |
printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
printf("General reg tid%llu: arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
atomic_inc(&threads_fault); |
break; |
} |
/trunk/kernel/test/fpu/fpu1.c |
---|
126,7 → 126,7 |
if ((int) (100000000 * e) != E_10e8) { |
if (!sh_quiet) |
printf("tid%d: e*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8); |
printf("tid%llu: e*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (100000000 * e), (unative_t) E_10e8); |
atomic_inc(&threads_fault); |
break; |
} |
161,7 → 161,7 |
#ifdef KERN_ia64_ARCH_H_ |
if ((int) (1000000 * pi) != PI_10e8) { |
if (!sh_quiet) |
printf("tid%d: pi*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (1000000 * pi), (unative_t) (PI_10e8 / 100)); |
printf("tid%llu: pi*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (1000000 * pi), (unative_t) (PI_10e8 / 100)); |
atomic_inc(&threads_fault); |
break; |
} |
168,7 → 168,7 |
#else |
if ((int) (100000000 * pi) != PI_10e8) { |
if (!sh_quiet) |
printf("tid%d: pi*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8); |
printf("tid%llu: pi*10e8=%zd should be %zd\n", THREAD->tid, (unative_t) (100000000 * pi), (unative_t) PI_10e8); |
atomic_inc(&threads_fault); |
break; |
} |
/trunk/kernel/test/fpu/sse1.c |
---|
72,7 → 72,7 |
if (arg != after_arg) { |
if (!sh_quiet) |
printf("tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
printf("tid%llu: arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
atomic_inc(&threads_fault); |
break; |
} |
104,7 → 104,7 |
if (arg != after_arg) { |
if (!sh_quiet) |
printf("tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
printf("tid%llu: arg(%d) != %d\n", THREAD->tid, arg, after_arg); |
atomic_inc(&threads_fault); |
break; |
} |