Changeset 5f1d850 in mainline
- Timestamp:
- 2018-09-07T16:00:22Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3cfe2b8
- Parents:
- e3306d04
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/atomic.h
re3306d04 r5f1d850 41 41 42 42 typedef size_t atomic_count_t; 43 typedef ssize_t atomic_signed_t;44 43 typedef atomic_size_t atomic_t; 45 44 … … 77 76 atomic_exchange_explicit(var_addr, new_val, memory_order_relaxed) 78 77 79 static inline bool test_and_set(atomic_t *val)80 {81 return atomic_exchange(val, 1);82 }83 84 85 78 #endif 86 79 -
uspace/lib/c/generic/private/futex.h
re3306d04 r5f1d850 81 81 82 82 #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) 84 84 #define futex_assert_is_not_locked(fut) ((void)0) 85 85
Note:
See TracChangeset
for help on using the changeset viewer.