Changeset 508b0df1 in mainline for uspace/app/tester/float


Ignore:
Timestamp:
2018-09-06T20:21:52Z (7 years ago)
Author:
Jiří Zárevúcky <jiri.zarevucky@…>
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)
Message:

Remove uspace <atomic.h>, use <stdatomic.h> instead

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/tester/float/float1.c

    r4621d23 r508b0df1  
    3232#include <stdlib.h>
    3333#include <stddef.h>
    34 #include <atomic.h>
     34#include <stdatomic.h>
    3535#include <fibril.h>
    3636#include <fibril_synch.h>
     
    4545
    4646static FIBRIL_SEMAPHORE_INITIALIZE(threads_finished, 0);
    47 static atomic_t threads_fault;
     47static atomic_int threads_fault;
    4848
    4949static errno_t e(void *data)
     
    6060
    6161                if ((uint32_t) (e * PRECISION) != E_10E8) {
    62                         atomic_inc(&threads_fault);
     62                        atomic_fetch_add(&threads_fault, 1);
    6363                        break;
    6464                }
     
    7171const char *test_float1(void)
    7272{
    73         atomic_count_t total = 0;
     73        int total = 0;
    7474
    75         atomic_set(&threads_fault, 0);
     75        atomic_store(&threads_fault, 0);
    7676        fibril_test_spawn_runners(THREADS);
    7777
     
    9292        TPRINTF("\n");
    9393
    94         for (unsigned int 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);
    9696                fibril_semaphore_down(&threads_finished);
    9797        }
    9898
    99         if (atomic_get(&threads_fault) == 0)
     99        if (atomic_load(&threads_fault) == 0)
    100100                return NULL;
    101101
Note: See TracChangeset for help on using the changeset viewer.