Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 2052 → Rev 2053

/trunk/kernel/test/fpu/mips2.c
45,6 → 45,7
static atomic_t threads_ok;
static atomic_t threads_fault;
static waitq_t can_start;
static bool sh_quiet;
 
static void testit1(void *data)
{
70,6 → 71,7
);
if (arg != after_arg) {
if (!sh_quiet)
printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
atomic_inc(&threads_fault);
break;
101,6 → 103,7
);
if (arg != after_arg) {
if (!sh_quiet)
printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg);
atomic_inc(&threads_fault);
break;
113,10 → 116,13
char * test_mips2(bool quiet)
{
unsigned int i, total = 0;
sh_quiet = quiet;
waitq_initialize(&can_start);
atomic_set(&threads_ok, 0);
atomic_set(&threads_fault, 0);
if (!quiet)
printf("Creating %d threads... ", 2 * THREADS);
 
for (i = 0; i < THREADS; i++) {
123,6 → 129,7
thread_t *t;
if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) {
if (!quiet)
printf("could not create thread %d\n", 2 * i);
break;
}
130,6 → 137,7
total++;
if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) {
if (!quiet)
printf("could not create thread %d\n", 2 * i + 1);
break;
}
136,6 → 144,8
thread_ready(t);
total++;
}
if (!quiet)
printf("ok\n");
thread_sleep(1);
142,6 → 152,7
waitq_wakeup(&can_start, WAKEUP_ALL);
while (atomic_get(&threads_ok) != total) {
if (!quiet)
printf("Threads left: %d\n", total - atomic_get(&threads_ok));
thread_sleep(1);
}