diff --git a/rm_osal.h b/rm_osal.h
index c41032ddfbd193fc67dab039c28e98f667fd1f20..63e0f7e615b6c58a9ffd69e1d1f09ec4a8f85dc3 100644 (file)
--- a/rm_osal.h
+++ b/rm_osal.h
*/
#include <string.h>
-extern void* Osal_rmMalloc (uint32_t num_bytes);
-extern void Osal_rmFree (void *ptr, uint32_t size);
+extern void* Osal_rmMalloc (uint32_t num_bytes, bool shared);
+extern void Osal_rmFree (void *ptr, uint32_t size, bool shared);
+extern void* Osal_rmLocalCsEnter (void);
+extern void Osal_rmLocalCsExit (void *CsHandle);
extern void* Osal_rmCsEnter (void);
extern void Osal_rmCsExit (void *CsHandle);
extern void* Osal_rmMtCsEnter (void);
* <b> Parameter </b>
* @n Number of bytes to be allocated
*
+ * <b> Parameter </b>
+ * @n If true the memory should could from shared memory
+ *
* <b> Return Value </b>
* @n Pointer to the allocated block size
*/
#define Rm_osalFree Osal_rmFree
+/**
+ * @brief The macro is used by the RM LLD to provide critical sections to
+ * protect shared variables from access from multiple RM instances
+ * on a single core
+ *
+ * <b> Prototype: </b>
+ * The following is the C prototype for the expected OSAL API.
+ *
+ * @verbatim
+ void* Osal_rmLocalCsEnter (void)
+ @endverbatim
+ *
+ * <b> Parameter </b>
+ * @n None.
+ *
+ * <b> Return Value </b>
+ * @n Handle used to lock critical section.
+ */
+#define Rm_osalLocalCsEnter Osal_rmLocalCsEnter
+
+/**
+ * @brief The macro is used by the RM LLD to exit a critical section
+ * protected using Osal_rmLocalCsEnter() API.
+ *
+ * <b> Prototype: </b>
+ * The following is the C prototype for the expected OSAL API.
+ *
+ * @verbatim
+ void Osal_rmLocalCsExit (void *CsHandle)
+ @endverbatim
+ *
+ * <b> Parameter </b>
+ * @n Handle for unlocking critical section.
+ *
+ * <b> Return Value </b>
+ * @n Not applicable.
+ */
+#define Rm_osalLocalCsExit Osal_rmLocalCsExit
+
/**
* @brief The macro is used by the RM LLD to provide critical sections to
* protect global and shared variables from