Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8951053b
authored
9 years ago
by
Danila Klimenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'embb471_basecpp_atomic' into development
parents
a3244754
e16653a5
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
7 deletions
+6
-7
base_cpp/include/embb/base/atomic.h
+1
-1
base_cpp/include/embb/base/internal/atomic/atomic_base.h
+1
-2
base_cpp/include/embb/base/internal/atomic/atomic_pointer.h
+4
-4
No files found.
base_cpp/include/embb/base/atomic.h
View file @
8951053b
...
...
@@ -478,7 +478,7 @@ class Atomic<BaseType*> : public embb::base::internal::atomic::
public
:
Atomic
()
:
embb
::
base
::
internal
::
atomic
::
AtomicPointer
<
BaseType
,
ptrdiff_t
,
sizeof
(
BaseType
*
)
>
()
{}
Atomic
(
BaseType
*
p
)
:
embb
::
base
::
internal
::
atomic
::
explicit
Atomic
(
BaseType
*
p
)
:
embb
::
base
::
internal
::
atomic
::
AtomicPointer
<
BaseType
,
ptrdiff_t
,
sizeof
(
BaseType
*
)
>
(
p
)
{}
BaseType
*
operator
=
(
BaseType
*
p
)
{
...
...
This diff is collapsed.
Click to expand it.
base_cpp/include/embb/base/internal/atomic/atomic_base.h
View file @
8951053b
...
...
@@ -177,8 +177,7 @@ CompareAndSwap(BaseType& expected, BaseType desired) {
compare_and_swap
(
&
AtomicValue
,
&
native_expected
,
native_desired
))
!=
0
?
true
:
false
;
if
(
!
return_val
)
expected
=
Load
();
memcpy
(
&
expected
,
&
native_expected
,
sizeof
(
expected
));
return
return_val
;
}
...
...
This diff is collapsed.
Click to expand it.
base_cpp/include/embb/base/internal/atomic/atomic_pointer.h
View file @
8951053b
...
...
@@ -65,8 +65,8 @@ class AtomicPointer : public AtomicArithmetic<BaseType*, DifferenceType, S> {
bool
IsPointer
()
const
;
// The methods below are documented in atomic.h
BaseType
*
operator
->
();
BaseType
&
operator
*
();
BaseType
*
operator
->
()
const
;
BaseType
&
operator
*
()
const
;
};
template
<
typename
BaseType
,
typename
DifferenceType
,
size_t
S
>
...
...
@@ -93,13 +93,13 @@ inline bool AtomicPointer<BaseType, DifferenceType, S>::
template
<
typename
BaseType
,
typename
DifferenceType
,
size_t
S
>
inline
BaseType
*
AtomicPointer
<
BaseType
,
DifferenceType
,
S
>::
operator
->
()
{
operator
->
()
const
{
return
this
->
Load
();
}
template
<
typename
BaseType
,
typename
DifferenceType
,
size_t
S
>
inline
BaseType
&
AtomicPointer
<
BaseType
,
DifferenceType
,
S
>::
operator
*
()
{
operator
*
()
const
{
return
*
(
this
->
Load
());
}
...
...
This diff is collapsed.
Click to expand it.
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