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
b3cb2345
authored
Oct 07, 2014
by
Christian Kern
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'development' of
https://github.com/siemens/embb
into development
parents
a32ff6eb
99de4d1e
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
7 deletions
+9
-7
dataflow_cpp/include/embb/dataflow/internal/select.h
+1
-0
dataflow_cpp/include/embb/dataflow/internal/switch.h
+1
-0
mtapi_c/src/embb_mtapi_id_pool_t.c
+6
-6
mtapi_c/src/embb_mtapi_id_pool_t.h
+1
-1
No files found.
dataflow_cpp/include/embb/dataflow/internal/select.h
View file @
b3cb2345
...
...
@@ -27,6 +27,7 @@
#ifndef EMBB_DATAFLOW_INTERNAL_SELECT_H_
#define EMBB_DATAFLOW_INTERNAL_SELECT_H_
#include <embb/dataflow/internal/action.h>
#include <embb/dataflow/internal/signal.h>
#include <embb/dataflow/internal/node.h>
#include <embb/dataflow/internal/inputs.h>
...
...
dataflow_cpp/include/embb/dataflow/internal/switch.h
View file @
b3cb2345
...
...
@@ -27,6 +27,7 @@
#ifndef EMBB_DATAFLOW_INTERNAL_SWITCH_H_
#define EMBB_DATAFLOW_INTERNAL_SWITCH_H_
#include <embb/dataflow/internal/action.h>
#include <embb/dataflow/internal/signal.h>
#include <embb/dataflow/internal/node.h>
#include <embb/dataflow/internal/inputs.h>
...
...
mtapi_c/src/embb_mtapi_id_pool_t.c
View file @
b3cb2345
...
...
@@ -42,7 +42,7 @@ void embb_mtapi_id_pool_initialize(
for
(
ii
=
1
;
ii
<
capacity
;
ii
++
)
{
that
->
id_buffer
[
ii
]
=
ii
;
}
that
->
ids_availabe
=
capacity
-
1
;
that
->
ids_availab
l
e
=
capacity
-
1
;
that
->
put_id_position
=
0
;
that
->
get_id_position
=
1
;
embb_mtapi_spinlock_initialize
(
&
that
->
lock
);
...
...
@@ -50,7 +50,7 @@ void embb_mtapi_id_pool_initialize(
void
embb_mtapi_id_pool_finalize
(
embb_mtapi_id_pool_t
*
that
)
{
that
->
capacity
=
0
;
that
->
ids_availabe
=
0
;
that
->
ids_availab
l
e
=
0
;
that
->
get_id_position
=
0
;
that
->
put_id_position
=
0
;
embb_mtapi_alloc_deallocate
(
that
->
id_buffer
);
...
...
@@ -64,9 +64,9 @@ mtapi_uint_t embb_mtapi_id_pool_allocate(embb_mtapi_id_pool_t * that) {
assert
(
MTAPI_NULL
!=
that
);
if
(
embb_mtapi_spinlock_acquire
(
&
that
->
lock
))
{
if
(
0
<
that
->
ids_availabe
)
{
if
(
0
<
that
->
ids_availab
l
e
)
{
/* take away one id */
that
->
ids_availabe
--
;
that
->
ids_availab
l
e
--
;
/* acquire position to fetch id from */
mtapi_uint_t
id_position
=
that
->
get_id_position
;
...
...
@@ -93,7 +93,7 @@ void embb_mtapi_id_pool_deallocate(
assert
(
MTAPI_NULL
!=
that
);
if
(
embb_mtapi_spinlock_acquire
(
&
that
->
lock
))
{
if
(
that
->
capacity
>
that
->
ids_availabe
)
{
if
(
that
->
capacity
>
that
->
ids_availab
l
e
)
{
/* acquire position to put id to */
mtapi_uint_t
id_position
=
that
->
put_id_position
;
that
->
put_id_position
++
;
...
...
@@ -105,7 +105,7 @@ void embb_mtapi_id_pool_deallocate(
that
->
id_buffer
[
id_position
]
=
id
;
/* make it available */
that
->
ids_availabe
++
;
that
->
ids_availab
l
e
++
;
}
embb_mtapi_spinlock_release
(
&
that
->
lock
);
}
else
{
...
...
mtapi_c/src/embb_mtapi_id_pool_t.h
View file @
b3cb2345
...
...
@@ -48,7 +48,7 @@ extern "C" {
struct
embb_mtapi_id_pool_struct
{
mtapi_uint_t
capacity
;
mtapi_uint_t
*
id_buffer
;
mtapi_uint_t
ids_availabe
;
mtapi_uint_t
ids_availab
l
e
;
mtapi_uint_t
get_id_position
;
mtapi_uint_t
put_id_position
;
embb_mtapi_spinlock_t
lock
;
...
...
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