Provide some kind of __sync_bool_compare_and_swap_4(), as it is used by CK,
and our gcc is too ancient to provide it. This should fix the build on mips.
This commit is contained in:
parent
4ca50eab86
commit
e459212853
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=316691
@ -287,8 +287,8 @@ EMIT_BITWISE_FETCH_AND_OP_N(2, uint16_t, fetch_and_xor, "xor", 0)
|
||||
* 32-bit routines.
|
||||
*/
|
||||
|
||||
uint32_t
|
||||
__sync_val_compare_and_swap_4(uint32_t *mem, uint32_t expected,
|
||||
static __inline uint32_t
|
||||
do_compare_and_swap_4(uint32_t *mem, uint32_t expected,
|
||||
uint32_t desired)
|
||||
{
|
||||
uint32_t old, temp;
|
||||
@ -307,6 +307,23 @@ __sync_val_compare_and_swap_4(uint32_t *mem, uint32_t expected,
|
||||
return (old);
|
||||
}
|
||||
|
||||
uint32_t
|
||||
__sync_val_compare_and_swap_4(uint32_t *mem, uint32_t expected,
|
||||
uint32_t desired)
|
||||
{
|
||||
|
||||
return (do_compare_and_swap_4(mem, expected, desired));
|
||||
}
|
||||
|
||||
bool
|
||||
__sync_bool_compare_and_swap_4(uint32_t *mem, uint32_t expected,
|
||||
uint32_t desired)
|
||||
{
|
||||
|
||||
return (do_compare_and_swap_4(mem, expected, desired) ==
|
||||
desired);
|
||||
}
|
||||
|
||||
#define EMIT_FETCH_AND_OP_4(name, op) \
|
||||
uint32_t \
|
||||
__sync_##name##_4(uint32_t *mem, uint32_t val) \
|
||||
|
Loading…
Reference in New Issue
Block a user