Commit 68d2ce69 by Winter

mtapi_c: added missing fields in mtapi_info_t structure

parent 2f7e8112
......@@ -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. */
};
/**
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment