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
9bc05809
authored
Jun 15, 2016
by
U-WW002\z003ksxf
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'embb561_solving_warnings' into development
parents
3beab173
09783257
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
7 deletions
+20
-7
containers_cpp/test/hazard_pointer_test.cc
+1
-1
containers_cpp/test/main.cc
+15
-2
doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h
+4
-4
No files found.
containers_cpp/test/hazard_pointer_test.cc
View file @
9bc05809
...
...
@@ -74,7 +74,7 @@ int* IntObjectTestPool::Allocate() {
}
void
IntObjectTestPool
::
Release
(
int
*
object_pointer
)
{
int
cell
=
object_pointer
-
simplePoolObjects
;
int
cell
=
static_cast
<
int
>
(
object_pointer
-
simplePoolObjects
)
;
simplePool
[
cell
].
Store
(
FREE_MARKER
);
}
...
...
containers_cpp/test/main.cc
View file @
9bc05809
...
...
@@ -24,13 +24,25 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <embb/base/c/memory_allocation.h>
#ifdef EMBB_PLATFORM_COMPILER_MSVC
// Suppress warning generated by malloc.h(160): expression before comma
// has no effect: expected expression with side effect
#pragma warning(push)
#pragma warning(disable : 4548)
#endif
#include <embb/containers/lock_free_tree_value_pool.h>
#include <embb/containers/wait_free_array_value_pool.h>
#include <embb/containers/wait_free_spsc_queue.h>
#include <embb/containers/object_pool.h>
#include <embb/containers/lock_free_stack.h>
#include <embb/containers/lock_free_mpmc_queue.h>
#include <embb/base/c/memory_allocation.h>
#ifdef EMBB_PLATFORM_COMPILER_MSVC
#pragma warning(pop) // Reset warning 4548
#endif
#include <partest/partest.h>
#include <embb/base/thread.h>
...
...
@@ -74,4 +86,4 @@ PT_MAIN("Data Structures C++") {
PT_RUN
(
ObjectPoolTest
<
WaitFreeArrayValuePool
<
bool
COMMA
false
>
>
);
PT_EXPECT
(
embb_get_bytes_allocated
()
==
0
);
}
}
\ No newline at end of file
doc/examples/mtapi/mtapi_cpp_wait_task-snippet.h
View file @
9bc05809
mtapi_status_t
status
=
task
.
Wait
(
MTAPI_INFINITE
);
if
(
status
!=
MTAPI_SUCCESS
)
{
printf
(
"task failed with error: %d
\n\n
"
,
status
);
exit
(
status
);
mtapi_status_t
task_
status
=
task
.
Wait
(
MTAPI_INFINITE
);
if
(
task_
status
!=
MTAPI_SUCCESS
)
{
printf
(
"task failed with error: %d
\n\n
"
,
task_
status
);
exit
(
task_
status
);
}
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