Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/libc/include/atomicdflt.h

    r228666c r81983e3  
    3737
    3838#ifndef LIBC_ARCH_ATOMIC_H_
    39         #error This file cannot be included directly, include atomic.h instead.
     39#error This file cannot be included directly, include atomic.h instead.
    4040#endif
    4141
    42 #include <stdint.h>
    4342#include <bool.h>
    4443
    4544typedef struct atomic {
    46         volatile atomic_count_t count;
     45        volatile long count;
    4746} atomic_t;
    4847
    49 static inline void atomic_set(atomic_t *val, atomic_count_t i)
     48static inline void atomic_set(atomic_t *val, long i)
    5049{
    51         val->count = i;
     50        val->count = i;
    5251}
    5352
    54 static inline atomic_count_t atomic_get(atomic_t *val)
     53static inline long atomic_get(atomic_t *val)
    5554{
    56         return val->count;
     55        return val->count;
    5756}
    5857
    5958#ifndef CAS
    60 static inline bool cas(atomic_t *val, atomic_count_t ov, atomic_count_t nv)
     59static inline bool cas(atomic_t *val, long ov, long nv)
    6160{
    6261        return __sync_bool_compare_and_swap(&val->count, ov, nv);
Note: See TracChangeset for help on using the changeset viewer.