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