Skip to content

Commit

Permalink
Small fix for x86 compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
jonano614 committed Nov 15, 2018
1 parent cc6bd84 commit 9f6d6f8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions client/utils/atomic.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ uint_least64_t atomic_exchange_uint_least64(atomic_uint_least64_t *object, uint_
#ifndef _WIN64
xdag_fatal("Atomic functions are not supported in x86 version. Contact support.");
exit(0);
#endif // !_WIN64

#else
atomic_exchange_switch_max64(object, desired);
#endif
}

#define atomic_compare_exchange_strong_switch_max64(object, expected, desired) \
Expand Down Expand Up @@ -78,15 +78,17 @@ int atomic_compare_exchange_strong_uintptr(atomic_uintptr_t *ptr, uintptr_t *exp
#ifndef _WIN64
xdag_fatal("Atomic functions are not supported in x86 version. Contact support.");
exit(0);
#endif // !_WIN64
#else
atomic_compare_exchange_strong_switch_max64(ptr, expected, desired);
#endif
}

int atomic_compare_exchange_strong_uint_least64(atomic_uint_least64_t *ptr, uint_least64_t *expected, uint_least64_t desired)
{
#ifndef _WIN64
xdag_fatal("Atomic functions are not supported in x86 version. Contact support.");
exit(0);
#endif // !_WIN64
#else
atomic_compare_exchange_strong_switch_max64(ptr, expected, desired);
#endif
}

0 comments on commit 9f6d6f8

Please sign in to comment.