Changeset deada67 in mainline for kernel/test/fpu/mips2.c
- Timestamp:
- 2006-12-19T17:54:50Z (19 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 730376d
- Parents:
- 6536a4a9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/test/fpu/mips2.c
r6536a4a9 rdeada67 46 46 static atomic_t threads_fault; 47 47 static waitq_t can_start; 48 static bool sh_quiet; 48 49 49 50 static void testit1(void *data) … … 71 72 72 73 if (arg != after_arg) { 73 printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); 74 if (!sh_quiet) 75 printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); 74 76 atomic_inc(&threads_fault); 75 77 break; … … 102 104 103 105 if (arg != after_arg) { 104 printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); 106 if (!sh_quiet) 107 printf("General reg tid%d: arg(%d) != %d\n", THREAD->tid, arg, after_arg); 105 108 atomic_inc(&threads_fault); 106 109 break; … … 114 117 { 115 118 unsigned int i, total = 0; 119 sh_quiet = quiet; 116 120 117 121 waitq_initialize(&can_start); 118 122 atomic_set(&threads_ok, 0); 119 123 atomic_set(&threads_fault, 0); 120 printf("Creating %d threads... ", 2 * THREADS); 124 125 if (!quiet) 126 printf("Creating %d threads... ", 2 * THREADS); 121 127 122 128 for (i = 0; i < THREADS; i++) { … … 124 130 125 131 if (!(t = thread_create(testit1, (void *) ((unative_t) 2 * i), TASK, 0, "testit1", false))) { 126 printf("could not create thread %d\n", 2 * i); 132 if (!quiet) 133 printf("could not create thread %d\n", 2 * i); 127 134 break; 128 135 } … … 131 138 132 139 if (!(t = thread_create(testit2, (void *) ((unative_t) 2 * i + 1), TASK, 0, "testit2", false))) { 133 printf("could not create thread %d\n", 2 * i + 1); 140 if (!quiet) 141 printf("could not create thread %d\n", 2 * i + 1); 134 142 break; 135 143 } … … 137 145 total++; 138 146 } 139 printf("ok\n"); 147 148 if (!quiet) 149 printf("ok\n"); 140 150 141 151 thread_sleep(1); … … 143 153 144 154 while (atomic_get(&threads_ok) != total) { 145 printf("Threads left: %d\n", total - atomic_get(&threads_ok)); 155 if (!quiet) 156 printf("Threads left: %d\n", total - atomic_get(&threads_ok)); 146 157 thread_sleep(1); 147 158 }
Note:
See TracChangeset
for help on using the changeset viewer.