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
dd88cefe
Commit
dd88cefe
authored
Dec 19, 2009
by
Vladislav Vaintroub
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing 64 bit Solaris atomic prototypes
parent
9c9cc490
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
include/atomic/solaris.h
include/atomic/solaris.h
+44
-0
No files found.
include/atomic/solaris.h
View file @
dd88cefe
...
...
@@ -60,6 +60,18 @@ my_atomic_cas32(int32 volatile *a, int32 *cmp, int32 set)
return
ret
;
}
STATIC_INLINE
int
my_atomic_cas64
(
int64
volatile
*
a
,
int64
*
cmp
,
int64
set
)
{
int
ret
;
int64
sav
;
sav
=
(
int64
)
atomic_cas_64
((
volatile
uint64_t
*
)
a
,
(
uint64_t
)
*
cmp
,
(
uint64_t
)
set
);
if
(
!
(
ret
=
(
sav
==
*
cmp
)))
*
cmp
=
sav
;
return
ret
;
}
STATIC_INLINE
int
my_atomic_casptr
(
void
*
volatile
*
a
,
void
**
cmp
,
void
*
set
)
{
...
...
@@ -97,6 +109,14 @@ my_atomic_add32(int32 volatile *a, int32 v)
return
(
nv
-
v
);
}
STATIC_INLINE
int64
my_atomic_add64
(
int64
volatile
*
a
,
int64
v
)
{
int64
nv
;
nv
=
atomic_add_64_nv
((
volatile
uint64_t
*
)
a
,
v
);
return
(
nv
-
v
);
}
/* ------------------------------------------------------------------------ */
#ifdef MY_ATOMIC_MODE_DUMMY
...
...
@@ -110,6 +130,9 @@ my_atomic_load16(int16 volatile *a) { return (*a); }
STATIC_INLINE
int32
my_atomic_load32
(
int32
volatile
*
a
)
{
return
(
*
a
);
}
STATIC_INLINE
int64
my_atomic_load64
(
int64
volatile
*
a
)
{
return
(
*
a
);
}
STATIC_INLINE
void
*
my_atomic_loadptr
(
void
*
volatile
*
a
)
{
return
(
*
a
);
}
...
...
@@ -124,6 +147,9 @@ my_atomic_store16(int16 volatile *a, int16 v) { *a = v; }
STATIC_INLINE
void
my_atomic_store32
(
int32
volatile
*
a
,
int32
v
)
{
*
a
=
v
;
}
STATIC_INLINE
void
my_atomic_store64
(
int64
volatile
*
a
,
int64
v
)
{
*
a
=
v
;
}
STATIC_INLINE
void
my_atomic_storeptr
(
void
*
volatile
*
a
,
void
*
v
)
{
*
a
=
v
;
}
...
...
@@ -149,6 +175,12 @@ my_atomic_load32(int32 volatile *a)
return
((
int32
)
atomic_or_32_nv
((
volatile
uint32_t
*
)
a
,
0
));
}
STATIC_INLINE
int64
my_atomic_load64
(
int64
volatile
*
a
)
{
return
((
int64
)
atomic_or_64_nv
((
volatile
uint64_t
*
)
a
,
0
));
}
STATIC_INLINE
void
*
my_atomic_loadptr
(
void
*
volatile
*
a
)
{
...
...
@@ -175,6 +207,12 @@ my_atomic_store32(int32 volatile *a, int32 v)
(
void
)
atomic_swap_32
((
volatile
uint32_t
*
)
a
,
(
uint32_t
)
v
);
}
STATIC_INLINE
void
my_atomic_store64
(
int64
volatile
*
a
,
int64
v
)
{
(
void
)
atomic_swap_64
((
volatile
uint64_t
*
)
a
,
(
uint64_t
)
v
);
}
STATIC_INLINE
void
my_atomic_storeptr
(
void
*
volatile
*
a
,
void
*
v
)
{
...
...
@@ -203,6 +241,12 @@ my_atomic_fas32(int32 volatile *a, int32 v)
return
((
int32
)
atomic_swap_32
((
volatile
uint32_t
*
)
a
,
(
uint32_t
)
v
));
}
STATIC_INLINE
int64
my_atomic_fas64
(
int64
volatile
*
a
,
int64
v
)
{
return
((
int64
)
atomic_swap_64
((
volatile
uint64_t
*
)
a
,
(
uint64_t
)
v
));
}
STATIC_INLINE
void
*
my_atomic_fasptr
(
void
*
volatile
*
a
,
void
*
v
)
{
...
...
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