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
f459e5ef
authored
Mar 08, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'embb463_mtapi_info_t' into development
parents
b9ca6dc9
27706c21
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
2 deletions
+41
-2
base_c/include/embb/base/c/internal/cmake_config.h.in
+6
-0
mtapi_c/include/embb/mtapi/c/mtapi.h
+27
-2
mtapi_c/src/embb_mtapi_node_t.c
+8
-0
No files found.
base_c/include/embb/base/c/internal/cmake_config.h.in
View file @
f459e5ef
...
...
@@ -53,4 +53,10 @@
*/
#cmakedefine EMBB_PLATFORM_HAS_GLIB_CPU
#define EMBB_BASE_VERSION_MAJOR ${EMBB_BASE_VERSION_MAJOR}
#define EMBB_BASE_VERSION_MINOR ${EMBB_BASE_VERSION_MINOR}
#define EMBB_BASE_VERSION_PATCH ${EMBB_BASE_VERSION_PATCH}
#endif /* EMBB_BASE_INTERNAL_CMAKE_CONFIG_H_ */
mtapi_c/include/embb/mtapi/c/mtapi.h
View file @
f459e5ef
...
...
@@ -250,6 +250,17 @@ extern "C" {
#endif
/* ---- MCA ORGANIZATION IDS ----------------------------------------------- */
#define MCA_ORG_ID_PSI 0
/* PolyCore Software, Inc. */
#define MCA_ORG_ID_FSL 1
/* Freescale, Inc. */
#define MCA_ORG_ID_MGC 2
/* Mentor Graphics, Corp. */
#define MCA_ORG_ID_ADI 3
/* Analog Devices */
#define MCA_ORG_ID_SIE 4
/* Siemens */
#define MCA_ORG_ID_EMB 5
/* EMB2 project */
#define MCA_ORG_ID_TBD 6
/* TBD */
/* ---- BASIC DEFINITIONS -------------------------------------------------- */
/** marks input parameters */
...
...
@@ -307,8 +318,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. */
};
/**
...
...
mtapi_c/src/embb_mtapi_node_t.c
View file @
f459e5ef
...
...
@@ -39,6 +39,8 @@
#include <embb_mtapi_scheduler_t.h>
#include <embb_mtapi_attr.h>
#include <embb/base/c/internal/cmake_config.h>
static
embb_mtapi_node_t
*
embb_mtapi_node_instance
=
NULL
;
...
...
@@ -120,6 +122,12 @@ 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
=
MCA_ORG_ID_EMB
;
node
->
info
.
implementation_version
=
EMBB_BASE_VERSION_MAJOR
*
0x1000
+
EMBB_BASE_VERSION_MINOR
;
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
)
{
...
...
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