mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
branches/zip: ut0auxconf_have_solaris_atomics.c: Get the
function declarations from <atomic.h>. Call the functions with proper arguments.
This commit is contained in:
parent
1c0cf56c45
commit
70f15d3fd9
1 changed files with 9 additions and 24 deletions
|
@ -21,34 +21,19 @@ If this program compiles, then Solaris libc atomic funcions are available.
|
|||
|
||||
Created April 18, 2009 Vasil Dimov
|
||||
*****************************************************************************/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int atomic_cas_ulong();
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int atomic_cas_32();
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int atomic_cas_64();
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
#endif
|
||||
int atomic_add_long();
|
||||
#include <atomic.h>
|
||||
|
||||
int
|
||||
main(int argc, char** argv)
|
||||
{
|
||||
atomic_cas_ulong();
|
||||
atomic_cas_32();
|
||||
atomic_cas_64();
|
||||
atomic_add_long();
|
||||
ulong_t ulong = 0;
|
||||
uint32_t uint32 = 0;
|
||||
uint64_t uint64 = 0;
|
||||
|
||||
atomic_cas_ulong(&ulong, 0, 1);
|
||||
atomic_cas_32(&uint32, 0, 1);
|
||||
atomic_cas_64(&uint64, 0, 1);
|
||||
atomic_add_long(&ulong, 0);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue