diff options
author | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-06-04 19:45:36 +0800 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2012-06-04 19:45:36 +0800 |
commit | 591e5e125f9de0513a732371378eeffe09ef4da5 (patch) | |
tree | d631e2313179ec61b484f1206e8f873b696ac41c /drivers/staging/nmf-cm/cm/engine/api/domain_engine.h | |
parent | 6da6382191c30868dd8bf0624f6c2439339b7760 (diff) | |
parent | 66e68aa37bceeb4279857b48d17023530aed4dbb (diff) |
Merge topic branch 'ste-multimedia-framework' into integration-linux-ux500
Signed-off-by: Philippe Langlais <philippe.langlais@stericsson.com>
Diffstat (limited to 'drivers/staging/nmf-cm/cm/engine/api/domain_engine.h')
-rw-r--r-- | drivers/staging/nmf-cm/cm/engine/api/domain_engine.h | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/drivers/staging/nmf-cm/cm/engine/api/domain_engine.h b/drivers/staging/nmf-cm/cm/engine/api/domain_engine.h new file mode 100644 index 00000000000..7cc6f33ed90 --- /dev/null +++ b/drivers/staging/nmf-cm/cm/engine/api/domain_engine.h @@ -0,0 +1,108 @@ +/* + * Copyright (C) ST-Ericsson SA 2010 + * Author: Jean-Philippe FASSINO <jean-philippe.fassino@stericsson.com> for ST-Ericsson. + * License terms: GNU General Public License (GPL) version 2. + */ +/*! + * \brief Public Component Manager Memory User SYSCALL API. + * + * This file contains the Component Manager SYSCALL API for manipulating domains. + * + */ + +#ifndef __INC_DOMAIN_ENGINE_H +#define __INC_DOMAIN_ENGINE_H + +#include <cm/engine/memory/inc/domain_type.h> + +/*! + * \brief Create a domain. + * + * Create a memory domain for use in the CM for component instantiation and memory allocation. + * + * \param[in] client Id of the client. + * \param[in] domain Description of domain memories. + * \param[out] handle Idetifier of the created domain + * + * \exception CM_INVALID_DOMAIN_DEFINITION + * \exception CM_INTERNAL_DOMAIN_OVERFLOW + * \exception CM_OK + * + * \return Error code. + * \ingroup CM_ENGINE_API + */ +PUBLIC IMPORT_SHARED t_cm_error CM_ENGINE_CreateMemoryDomain( + const t_nmf_client_id client, + const t_cm_domain_memory *domain, + t_cm_domain_id *handle + ); + +/*! + * \brief Create a scratch domain. + * + * Create a scratch memory domain. Scratch domains + * are used to perform overlapping allocations. + * + * \param[in] client Id of the client. + * \param[in] parentId Identifier of the parent domain. + * \param[in] domain Description of domain memories. + * \param[out] handle Idetifier of the created domain + * + * \exception CM_INVALID_DOMAIN_DEFINITION + * \exception CM_INTERNAL_DOMAIN_OVERFLOW + * \exception CM_NO_MORE_MEMORY + * \exception CM_OK + * + * \return Error code. + * \ingroup CM_ENGINE_API + */ +PUBLIC IMPORT_SHARED t_cm_error CM_ENGINE_CreateMemoryDomainScratch( + const t_nmf_client_id client, + const t_cm_domain_id parentId, + const t_cm_domain_memory *domain, + t_cm_domain_id *handle + ); + +/*! + * \brief Destroy a memory domain. + + * \param[in] handle Domain identifier to destroy. + * + * \exception CM_INVALID_DOMAIN_HANDLE + * \exception CM_OK + * + * \return Error code. + * + * \ingroup CM_ENGINE_API + */ +PUBLIC IMPORT_SHARED t_cm_error CM_ENGINE_DestroyMemoryDomain( + t_cm_domain_id handle); + +/*! + * \brief Destroy all domains belonging to a given client. + * + * \param[in] client + * + * \return Error code. + * + * \ingroup CM_ENGINE_API + */ +PUBLIC IMPORT_SHARED t_cm_error CM_ENGINE_FlushMemoryDomains( + t_nmf_client_id client); + +/*! + * \brief Retrieve the coreId for a given domain. Utility. + + * \param[in] domainId Domain identifier. + * \param[out] coreId Core identifier. + * + * \exception CM_INVALID_DOMAIN_HANDLE Invalid domain handle + * \exception CM_OK + * + * \return Error code. + * + * \ingroup CM_ENGINE_API + */ +PUBLIC IMPORT_SHARED t_cm_error CM_ENGINE_GetDomainCoreId(const t_cm_domain_id domainId, t_nmf_core_id *coreId); + +#endif /* __INC_DOMAIN_ENGINE_H */ |