Changeset 5f1d850 in mainline


Ignore:
Timestamp:
2018-09-07T16:00:22Z (6 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:
3cfe2b8
Parents:
e3306d04
Message:

Convert atomic_t to atomic_size_t (5): Remove unused atomic_signed_t

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/atomic.h

    re3306d04 r5f1d850  
    4141
    4242typedef size_t atomic_count_t;
    43 typedef ssize_t atomic_signed_t;
    4443typedef atomic_size_t atomic_t;
    4544
     
    7776        atomic_exchange_explicit(var_addr, new_val, memory_order_relaxed)
    7877
    79 static inline bool test_and_set(atomic_t *val)
    80 {
    81         return atomic_exchange(val, 1);
    82 }
    83 
    84 
    8578#endif
    8679
  • uspace/lib/c/generic/private/futex.h

    re3306d04 r5f1d850  
    8181
    8282#define futex_give_to(fut, owner) ((void)0)
    83 #define futex_assert_is_locked(fut) assert((atomic_signed_t) (fut)->val.count <= 0)
     83#define futex_assert_is_locked(fut) assert(atomic_load_explicit(&(fut)->val, memory_order_relaxed) <= 0)
    8484#define futex_assert_is_not_locked(fut) ((void)0)
    8585
Note: See TracChangeset for help on using the changeset viewer.