Changeset 508b0df1 in mainline for uspace/app/tester/float
- Timestamp:
- 2018-09-06T20:21:52Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 78de83de, fc10e1b
- Parents:
- 4621d23
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-08-13 03:53:39)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-09-06 20:21:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/float/float1.c
r4621d23 r508b0df1 32 32 #include <stdlib.h> 33 33 #include <stddef.h> 34 #include < atomic.h>34 #include <stdatomic.h> 35 35 #include <fibril.h> 36 36 #include <fibril_synch.h> … … 45 45 46 46 static FIBRIL_SEMAPHORE_INITIALIZE(threads_finished, 0); 47 static atomic_ t threads_fault;47 static atomic_int threads_fault; 48 48 49 49 static errno_t e(void *data) … … 60 60 61 61 if ((uint32_t) (e * PRECISION) != E_10E8) { 62 atomic_ inc(&threads_fault);62 atomic_fetch_add(&threads_fault, 1); 63 63 break; 64 64 } … … 71 71 const char *test_float1(void) 72 72 { 73 atomic_count_t total = 0;73 int total = 0; 74 74 75 atomic_s et(&threads_fault, 0);75 atomic_store(&threads_fault, 0); 76 76 fibril_test_spawn_runners(THREADS); 77 77 … … 92 92 TPRINTF("\n"); 93 93 94 for ( unsignedint i = 0; i < total; i++) {95 TPRINTF("Threads left: % " PRIua "\n", total - i);94 for (int i = 0; i < total; i++) { 95 TPRINTF("Threads left: %d\n", total - i); 96 96 fibril_semaphore_down(&threads_finished); 97 97 } 98 98 99 if (atomic_ get(&threads_fault) == 0)99 if (atomic_load(&threads_fault) == 0) 100 100 return NULL; 101 101
Note:
See TracChangeset
for help on using the changeset viewer.