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
68d2ce69
authored
9 years ago
by
Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mtapi_c: added missing fields in mtapi_info_t structure
parent
2f7e8112
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
2 deletions
+21
-2
mtapi_c/include/embb/mtapi/c/mtapi.h
+16
-2
mtapi_c/src/embb_mtapi_node_t.c
+5
-0
No files found.
mtapi_c/include/embb/mtapi/c/mtapi.h
View file @
68d2ce69
...
...
@@ -307,8 +307,22 @@ typedef mtapi_uint_t mtapi_size_t;
* \ingroup RUNTIME_INIT_SHUTDOWN
*/
struct
mtapi_info_struct
{
unsigned
int
hardware_concurrency
;
/**< number of CPU cores */
unsigned
int
used_memory
;
/**< bytes of memory used by MTAPI */
mtapi_uint_t
mtapi_version
;
/**< The three last (rightmost) hex
digits are the minor number, and
those left of the minor number are
the major number. */
mtapi_uint_t
organization_id
;
/**< Implementation vendor or
organization ID. */
mtapi_uint_t
implementation_version
;
/**< The three last (rightmost) hex
digits are the minor number, and
those left of the minor number are
the major number.*/
mtapi_uint_t
number_of_domains
;
/**< Number of domains allowed by the
implementation.*/
mtapi_uint_t
number_of_nodes
;
/**< Number of nodes allowed by the
implementation.*/
mtapi_uint_t
hardware_concurrency
;
/**< Number of CPU cores available. */
mtapi_uint_t
used_memory
;
/**< Bytes of memory used by MTAPI. */
};
/**
...
...
This diff is collapsed.
Click to expand it.
mtapi_c/src/embb_mtapi_node_t.c
View file @
68d2ce69
...
...
@@ -120,6 +120,11 @@ void mtapi_initialize(
node
->
scheduler
=
embb_mtapi_scheduler_new
();
if
(
MTAPI_NULL
!=
node
->
scheduler
)
{
/* fill information structure */
node
->
info
.
mtapi_version
=
0x1000
;
// mtapi version 1.0
node
->
info
.
organization_id
=
0x4711
;
// TODO(marcus): change to real id
node
->
info
.
implementation_version
=
0x0003
;
// implementation version 0.3
node
->
info
.
number_of_domains
=
1
;
node
->
info
.
number_of_nodes
=
1
;
node
->
info
.
hardware_concurrency
=
embb_core_count_available
();
node
->
info
.
used_memory
=
embb_mtapi_alloc_get_bytes_allocated
();
if
(
MTAPI_NULL
!=
mtapi_info
)
{
...
...
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