Changeset cb01e1e in mainline for kernel/test/fpu/mips2.c
- Timestamp:
- 2009-04-04T00:26:27Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a85aebd
- Parents:
- 171f9a1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/fpu/mips2.c
r171f9a1 rcb01e1e 44 44 static atomic_t threads_fault; 45 45 static waitq_t can_start; 46 static bool sh_quiet;47 46 48 47 static void testit1(void *data) … … 70 69 71 70 if (arg != after_arg) { 72 if (!sh_quiet) 73 printf("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); 71 TPRINTF("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); 74 72 atomic_inc(&threads_fault); 75 73 break; … … 102 100 103 101 if (arg != after_arg) { 104 if (!sh_quiet) 105 printf("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); 102 TPRINTF("General reg tid%" PRIu64 ": arg(%d) != %d\n", THREAD->tid, arg, after_arg); 106 103 atomic_inc(&threads_fault); 107 104 break; … … 112 109 113 110 114 char * test_mips2(bool quiet)111 char *test_mips2(void) 115 112 { 116 113 unsigned int i, total = 0; 117 sh_quiet = quiet;118 114 119 115 waitq_initialize(&can_start); … … 121 117 atomic_set(&threads_fault, 0); 122 118 123 if (!quiet) 124 printf("Creating %u threads... ", 2 * THREADS); 119 TPRINTF("Creating %u threads... ", 2 * THREADS); 125 120 126 121 for (i = 0; i < THREADS; i++) { … … 128 123 129 124 if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) { 130 if (!quiet) 131 printf("could not create thread %u\n", 2 * i); 125 TPRINTF("could not create thread %u\n", 2 * i); 132 126 break; 133 127 } … … 136 130 137 131 if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) { 138 if (!quiet) 139 printf("could not create thread %u\n", 2 * i + 1); 132 TPRINTF("could not create thread %u\n", 2 * i + 1); 140 133 break; 141 134 } … … 144 137 } 145 138 146 if (!quiet) 147 printf("ok\n"); 139 TPRINTF("ok\n"); 148 140 149 141 thread_sleep(1); … … 151 143 152 144 while (atomic_get(&threads_ok) != (long) total) { 153 if (!quiet) 154 printf("Threads left: %d\n", total - atomic_get(&threads_ok)); 145 TPRINTF("Threads left: %d\n", total - atomic_get(&threads_ok)); 155 146 thread_sleep(1); 156 147 }
Note:
See TracChangeset
for help on using the changeset viewer.