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
Jun 16, 2015
by
Danila Klimenko
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'embb471_basecpp_atomic' into development
parents
a3244754
e16653a5
Hide 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::
...
@@ -478,7 +478,7 @@ class Atomic<BaseType*> : public embb::base::internal::atomic::
public
:
public
:
Atomic
()
:
embb
::
base
::
internal
::
atomic
::
Atomic
()
:
embb
::
base
::
internal
::
atomic
::
AtomicPointer
<
BaseType
,
ptrdiff_t
,
sizeof
(
BaseType
*
)
>
()
{}
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
)
{}
AtomicPointer
<
BaseType
,
ptrdiff_t
,
sizeof
(
BaseType
*
)
>
(
p
)
{}
BaseType
*
operator
=
(
BaseType
*
p
)
{
BaseType
*
operator
=
(
BaseType
*
p
)
{
...
...
base_cpp/include/embb/base/internal/atomic/atomic_base.h
View file @
8951053b
...
@@ -177,8 +177,7 @@ CompareAndSwap(BaseType& expected, BaseType desired) {
...
@@ -177,8 +177,7 @@ CompareAndSwap(BaseType& expected, BaseType desired) {
compare_and_swap
(
&
AtomicValue
,
&
native_expected
,
native_desired
))
!=
0
compare_and_swap
(
&
AtomicValue
,
&
native_expected
,
native_desired
))
!=
0
?
true
:
false
;
?
true
:
false
;
if
(
!
return_val
)
memcpy
(
&
expected
,
&
native_expected
,
sizeof
(
expected
));
expected
=
Load
();
return
return_val
;
return
return_val
;
}
}
...
...
base_cpp/include/embb/base/internal/atomic/atomic_pointer.h
View file @
8951053b
...
@@ -65,8 +65,8 @@ class AtomicPointer : public AtomicArithmetic<BaseType*, DifferenceType, S> {
...
@@ -65,8 +65,8 @@ class AtomicPointer : public AtomicArithmetic<BaseType*, DifferenceType, S> {
bool
IsPointer
()
const
;
bool
IsPointer
()
const
;
// The methods below are documented in atomic.h
// The methods below are documented in atomic.h
BaseType
*
operator
->
();
BaseType
*
operator
->
()
const
;
BaseType
&
operator
*
();
BaseType
&
operator
*
()
const
;
};
};
template
<
typename
BaseType
,
typename
DifferenceType
,
size_t
S
>
template
<
typename
BaseType
,
typename
DifferenceType
,
size_t
S
>
...
@@ -93,13 +93,13 @@ inline bool AtomicPointer<BaseType, DifferenceType, S>::
...
@@ -93,13 +93,13 @@ inline bool AtomicPointer<BaseType, DifferenceType, S>::
template
<
typename
BaseType
,
typename
DifferenceType
,
size_t
S
>
template
<
typename
BaseType
,
typename
DifferenceType
,
size_t
S
>
inline
BaseType
*
AtomicPointer
<
BaseType
,
DifferenceType
,
S
>::
inline
BaseType
*
AtomicPointer
<
BaseType
,
DifferenceType
,
S
>::
operator
->
()
{
operator
->
()
const
{
return
this
->
Load
();
return
this
->
Load
();
}
}
template
<
typename
BaseType
,
typename
DifferenceType
,
size_t
S
>
template
<
typename
BaseType
,
typename
DifferenceType
,
size_t
S
>
inline
BaseType
&
AtomicPointer
<
BaseType
,
DifferenceType
,
S
>::
inline
BaseType
&
AtomicPointer
<
BaseType
,
DifferenceType
,
S
>::
operator
*
()
{
operator
*
()
const
{
return
*
(
this
->
Load
());
return
*
(
this
->
Load
());
}
}
...
...
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