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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
6ad3179d
Commit
6ad3179d
authored
Dec 12, 2011
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix GCC build failure in PBXT in some cases/platforms.
parent
15e9be7a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
storage/pbxt/src/lock_xt.h
storage/pbxt/src/lock_xt.h
+4
-4
No files found.
storage/pbxt/src/lock_xt.h
View file @
6ad3179d
...
@@ -67,9 +67,9 @@ inline void xt_atomic_inc1(volatile xtWord1 *mptr)
...
@@ -67,9 +67,9 @@ inline void xt_atomic_inc1(volatile xtWord1 *mptr)
#elif defined(XT_ATOMIC_GNUC_X86)
#elif defined(XT_ATOMIC_GNUC_X86)
xtWord1
val
;
xtWord1
val
;
asm
volatile
(
"movb %1,%0"
:
"=
r
"
(
val
)
:
"m"
(
*
mptr
)
:
"memory"
);
asm
volatile
(
"movb %1,%0"
:
"=
q
"
(
val
)
:
"m"
(
*
mptr
)
:
"memory"
);
val
++
;
val
++
;
asm
volatile
(
"xchgb %1,%0"
:
"=
r
"
(
val
)
:
"m"
(
*
mptr
),
"0"
(
val
)
:
"memory"
);
asm
volatile
(
"xchgb %1,%0"
:
"=
q
"
(
val
)
:
"m"
(
*
mptr
),
"0"
(
val
)
:
"memory"
);
#elif defined(XT_ATOMIC_SOLARIS_LIB)
#elif defined(XT_ATOMIC_SOLARIS_LIB)
atomic_inc_8
(
mptr
);
atomic_inc_8
(
mptr
);
#else
#else
...
@@ -91,9 +91,9 @@ inline xtWord1 xt_atomic_dec1(volatile xtWord1 *mptr)
...
@@ -91,9 +91,9 @@ inline xtWord1 xt_atomic_dec1(volatile xtWord1 *mptr)
#elif defined(XT_ATOMIC_GNUC_X86)
#elif defined(XT_ATOMIC_GNUC_X86)
xtWord1
val2
;
xtWord1
val2
;
asm
volatile
(
"movb %1, %0"
:
"=
r
"
(
val
)
:
"m"
(
*
mptr
)
:
"memory"
);
asm
volatile
(
"movb %1, %0"
:
"=
q
"
(
val
)
:
"m"
(
*
mptr
)
:
"memory"
);
val
--
;
val
--
;
asm
volatile
(
"xchgb %1,%0"
:
"=
r
"
(
val2
)
:
"m"
(
*
mptr
),
"0"
(
val
)
:
"memory"
);
asm
volatile
(
"xchgb %1,%0"
:
"=
q
"
(
val2
)
:
"m"
(
*
mptr
),
"0"
(
val
)
:
"memory"
);
/* Should work, but compiler makes a mistake?
/* Should work, but compiler makes a mistake?
* asm volatile ("xchgb %1, %0" : : "r" (val), "m" (*mptr) : "memory");
* asm volatile ("xchgb %1, %0" : : "r" (val), "m" (*mptr) : "memory");
*/
*/
...
...
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