Fixed Solaris build issues
This commit is contained in:
parent
2126212df1
commit
d60b5fa260
@ -68,18 +68,12 @@
|
|||||||
#include "atomic/nolock.h"
|
#include "atomic/nolock.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef make_atomic_cas_body
|
#ifndef MY_ATOMIC_NOLOCK
|
||||||
/*
|
|
||||||
When implementing atomics using solaris.h we will end up here.
|
|
||||||
In this case we have already implemented all atomic functions
|
|
||||||
and no more work is needed, this is indicated by MY_ATOMICS_MADE
|
|
||||||
being defined but not make_atomic_cas_body.
|
|
||||||
*/
|
|
||||||
#ifndef MY_ATOMICS_MADE
|
|
||||||
/* nolock.h was not able to generate even a CAS function, fall back */
|
/* nolock.h was not able to generate even a CAS function, fall back */
|
||||||
#include "atomic/rwlock.h"
|
#include "atomic/rwlock.h"
|
||||||
#endif
|
#endif
|
||||||
#else
|
|
||||||
|
#ifndef MY_ATOMICS_MADE
|
||||||
/* define missing functions by using the already generated ones */
|
/* define missing functions by using the already generated ones */
|
||||||
#ifndef make_atomic_add_body
|
#ifndef make_atomic_add_body
|
||||||
#define make_atomic_add_body(S) \
|
#define make_atomic_add_body(S) \
|
||||||
@ -102,7 +96,6 @@
|
|||||||
#define make_atomic_store_body(S) \
|
#define make_atomic_store_body(S) \
|
||||||
(void)(my_atomic_fas ## S (a, v));
|
(void)(my_atomic_fas ## S (a, v));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
transparent_union doesn't work in g++
|
transparent_union doesn't work in g++
|
||||||
@ -295,6 +288,7 @@ make_atomic_store(ptr)
|
|||||||
#undef make_atomic_store_body
|
#undef make_atomic_store_body
|
||||||
#undef make_atomic_fas_body
|
#undef make_atomic_fas_body
|
||||||
#undef intptr
|
#undef intptr
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
the macro below defines (as an expression) the code that
|
the macro below defines (as an expression) the code that
|
||||||
|
Loading…
x
Reference in New Issue
Block a user