Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
fe1287ea
Commit
fe1287ea
authored
Dec 15, 2009
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed 64-bit atomics on Win x86 and removed support for 8 and 16-bit atomic operations
parent
f06d24c1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
16 deletions
+4
-16
include/atomic/generic-msvc.h
include/atomic/generic-msvc.h
+1
-12
include/my_atomic.h
include/my_atomic.h
+3
-4
No files found.
include/atomic/generic-msvc.h
View file @
fe1287ea
...
@@ -37,29 +37,18 @@
...
@@ -37,29 +37,18 @@
C_MODE_START
C_MODE_START
/*Visual Studio 2003 and earlier do not have prototypes for atomic intrinsics*/
/*Visual Studio 2003 and earlier do not have prototypes for atomic intrinsics*/
LONG
_InterlockedExchange
(
LONG
volatile
*
Target
,
LONG
Value
);
LONG
_InterlockedExchange
(
LONG
volatile
*
Target
,
LONG
Value
);
LONGLONG
_InterlockedExchange64
(
LONGLONG
volatile
*
Target
,
LONGLONG
Value
);
LONG
_InterlockedCompareExchange
(
LONG
volatile
*
Target
,
LONG
Value
,
LONG
Comp
);
LONG
_InterlockedCompareExchange
(
LONG
volatile
*
Target
,
LONG
Value
,
LONG
Comp
);
LONGLONG
_InterlockedCompareExchange64
(
LONGLONG
volatile
*
Target
,
LONGLONG
Value
,
LONGLONG
Comp
);
LONG
_InterlockedExchangeAdd
(
LONG
volatile
*
Addend
,
LONG
Value
);
LONG
_InterlockedExchangeAdd
(
LONG
volatile
*
Addend
,
LONG
Value
);
LONGLONG
_InterlockedExchangeAdd64
(
LONGLONG
volatile
*
Addend
,
LONGLONG
Value
);
C_MODE_END
C_MODE_END
#pragma intrinsic(_InterlockedExchangeAdd)
#pragma intrinsic(_InterlockedExchangeAdd)
#pragma intrinsic(_InterlockedCompareExchange)
#pragma intrinsic(_InterlockedCompareExchange)
#pragma intrinsic(_InterlockedExchange)
#pragma intrinsic(_InterlockedExchange)
#pragma intrinsic(_InterlockedExchangeAdd64)
#pragma intrinsic(_InterlockedCompareExchange64)
#pragma intrinsic(_InterlockedExchange64)
#endif
#endif
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchange _InterlockedExchange
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#define InterlockedExchangeAdd _InterlockedExchangeAdd
#define InterlockedCompareExchange _InterlockedCompareExchange
#define InterlockedCompareExchange _InterlockedCompareExchange
#define InterlockedExchange64 _InterlockedExchange64
#define InterlockedExchangeAdd64 _InterlockedExchangeAdd64
#define InterlockedCompareExchange64 _InterlockedCompareExchange64
/*
/*
No need to do something special for InterlockedCompareExchangePointer
No need to do something special for InterlockedCompareExchangePointer
as it is a #define to InterlockedCompareExchange. The same applies to
as it is a #define to InterlockedCompareExchange. The same applies to
...
...
include/my_atomic.h
View file @
fe1287ea
...
@@ -56,11 +56,10 @@
...
@@ -56,11 +56,10 @@
#define intptr void *
#define intptr void *
/**
/**
On most platforms we implement 8-bit, 16-bit, 32-bit and "pointer"
Currently we don't support 8-bit and 16-bit operations.
operations. Thus the symbol below is defined by default; platforms
It can be added later if needed.
where we leave out 8-bit or 16-bit operations should undefine it.
*/
*/
#
define MY_ATOMIC_HAS_8_16 1
#
undef MY_ATOMIC_HAS_8_16
#ifndef MY_ATOMIC_MODE_RWLOCKS
#ifndef MY_ATOMIC_MODE_RWLOCKS
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment