Changeset a35b458 in mainline for uspace/app/tester/float/float1.c
- Timestamp:
- 2018-03-02T20:10:49Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f1380b7
- Parents:
- 3061bc1
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:38:31)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-03-02 20:10:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/float/float1.c
r3061bc1 ra35b458 52 52 double e = 0; 53 53 double f = 1; 54 54 55 55 for (double d = 1; e != le; d *= f, f += 1) { 56 56 le = e; 57 57 e = e + 1 / d; 58 58 } 59 59 60 60 if ((uint32_t) (e * PRECISION) != E_10E8) { 61 61 atomic_inc(&threads_fault); … … 63 63 } 64 64 } 65 65 66 66 atomic_inc(&threads_finished); 67 67 } … … 70 70 { 71 71 atomic_count_t total = 0; 72 72 73 73 atomic_set(&threads_finished, 0); 74 74 atomic_set(&threads_fault, 0); 75 75 76 76 TPRINTF("Creating threads"); 77 77 for (unsigned int i = 0; i < THREADS; i++) { … … 80 80 break; 81 81 } 82 82 83 83 TPRINTF("."); 84 84 total++; 85 85 } 86 86 87 87 TPRINTF("\n"); 88 88 89 89 while (atomic_get(&threads_finished) < total) { 90 90 TPRINTF("Threads left: %" PRIua "\n", … … 92 92 thread_sleep(1); 93 93 } 94 94 95 95 if (atomic_get(&threads_fault) == 0) 96 96 return NULL; 97 97 98 98 return "Test failed"; 99 99 }
Note:
See TracChangeset
for help on using the changeset viewer.