Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
ITABase
Commits
67367f4c
Commit
67367f4c
authored
Aug 28, 2016
by
js908001
Browse files
Fixing GCC builtin atomics cast problem
parent
2f7a00ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ITAAtomicOpsGCCBuiltinsImpl.cpp
View file @
67367f4c
...
...
@@ -90,8 +90,10 @@ void atomic_read32(volatile void* src, void* dest) {
*
((
int32_t
*
)
dest
)
=
__sync_val_compare_and_swap
((
volatile
int32_t
*
)
src
,
0
,
0
);
}
bool
atomic_cas32
(
volatile
void
*
dest
,
void
*
expected_value
,
void
*
new_value
)
{
return
__sync_bool_compare_and_swap
((
volatile
int32_t
*
)
dest
,
(
int32_t
*
)
expected_value
,
(
int32_t
*
)
new_value
);
bool
atomic_cas32
(
volatile
void
*
dest
,
void
*
expected_value
,
void
*
new_value
)
{
return
__sync_bool_compare_and_swap
(
&
dest
,
expected_value
,
new_value
);
//return __sync_bool_compare_and_swap( (volatile int32_t*)dest, (int32_t*)expected_value, (int32_t*)new_value );
}
int
atomic_inc_int
(
volatile
int
*
dest
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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