diff --git a/rm_osal.h b/rm_osal.h
index 8825204def9eb63dd86ce62625397f2d58c34dd6..fbee72006466e9838f67bc0803195bfd94d8746a 100644 (file)
--- a/rm_osal.h
+++ b/rm_osal.h
extern void *Osal_rmMalloc (uint32_t num_bytes);
extern void Osal_rmFree (void *ptr, uint32_t size);
+extern void *Osal_rmCsEnter (void);
+extern void Osal_rmCsExit (void *CsHandle);
+extern void *Osal_rmMtCsEnter (void *mtSemObj);
+extern void Osal_rmMtCsExit (void *mtSemObj, void *CsHandle);
+extern void Osal_rmBeginMemAccess (void *ptr, uint32_t size);
+extern void Osal_rmEndMemAccess (void *ptr, uint32_t size);
extern void *Osal_rmTaskBlockCreate (void);
extern void Osal_rmTaskBlock (void *handle);
extern void Osal_rmTaskUnblock (void *handle);
*/
#define Rm_osalFree Osal_rmFree
+/**
+ * @brief The function is used to enter a critical section.
+ * Function protects against
+ *
+ * access from multiple cores
+ * and
+ * access from multiple threads on single core
+ *
+ * <b> Prototype: </b>
+ * The following is the C prototype for the expected OSAL API.
+ *
+ * @verbatim
+ void *Osal_rmCsEnter (void)
+ @endverbatim
+ *
+ * <b> Parameter </b>
+ * @n Not applicable.
+ *
+ * <b> Return Value </b>
+ * @n Handle used to lock critical section
+ */
+#define Rm_osalCsEnter Osal_rmCsEnter
+
+/**
+ * @brief The function is used to exit a critical section
+ * protected using Osal_rmCsEnter() API.
+ *
+ * <b> Prototype: </b>
+ * The following is the C prototype for the expected OSAL API.
+ *
+ * @verbatim
+ void Osal_rmCsExit (void *CsHandle)
+ @endverbatim
+ *
+ * <b> Parameter </b>
+ * @n Handle for unlocking critical section.
+ *
+ * <b> Return Value </b>
+ * @n Not applicable.
+ */
+#define Rm_osalCsExit Osal_rmCsExit
+
+/**
+ * @brief The function is used to enter a multi-threaded critical
+ * section. Function protects against
+ *
+ * access from multiple threads on single core
+ *
+ * <b> Prototype: </b>
+ * The following is the C prototype for the expected OSAL API.
+ *
+ * @verbatim
+ void *Osal_rmMtCsEnter (void *mtSemObj)
+ @endverbatim
+ *
+ * <b> Parameter </b>
+ * @n Multi-threaded critical section object handle.
+ *
+ * <b> Return Value </b>
+ * @n Handle used to lock the multi-threaded critical section
+ */
+#define Rm_osalMtCsEnter Osal_rmMtCsEnter
+
+/**
+ * @brief The function is used to exit a multi-threaded critical
+ * section protected using Osal_rmMtCsEnter() API.
+ *
+ * <b> Prototype: </b>
+ * The following is the C prototype for the expected OSAL API.
+ *
+ * @verbatim
+ void Osal_rmMtCsExit (void *mtSemObj, void *CsHandle)
+ @endverbatim
+ *
+ * <b> Parameter </b>
+ * @n Multi-threaded critical section object handle.
+ *
+ * <b> Parameter </b>
+ * @n Handle for unlocking multi-threaded critical section.
+ *
+ * <b> Return Value </b>
+ * @n Not applicable.
+ */
+#define Rm_osalMtCsExit Osal_rmMtCsExit
+
+/**
+ * @brief The function is used to indicate that a block of memory is
+ * about to be accessed. If the memory block is cached then this
+ * indicates that the application would need to ensure that the
+ * cache is updated with the data from the actual memory.
+ *
+ * <b> Prototype: </b>
+ * The following is the C prototype for the expected OSAL API.
+ *
+ * @verbatim
+ void Osal_rmBeginMemAccess (void *ptr, uint32_t size)
+ @endverbatim
+ *
+ * <b> Parameter </b>
+ * @n Address of memory block
+ * @n Size of memory block
+ *
+ * <b> Return Value </b>
+ * @n Not applicable.
+ */
+#define Rm_osalBeginMemAccess Osal_rmBeginMemAccess
+
+/**
+ * @brief The function is used to indicate that the block of memory has
+ * finished being accessed. If the memory block is cached then the
+ * application would need to ensure that the contents of the cache
+ * are updated immediately to the actual memory.
+ *
+ * <b> Prototype: </b>
+ * The following is the C prototype for the expected OSAL API.
+ *
+ * @verbatim
+ void Osal_rmEndMemAccess (void *ptr, uint32_t size)
+ @endverbatim
+ *
+ * <b> Parameter </b>
+ * @n Address of memory block
+ * @n Size of memory block
+ *
+ * <b> Return Value </b>
+ * @n Not applicable.
+ */
+#define Rm_osalEndMemAccess Osal_rmEndMemAccess
+
/**
* @brief The macro is used by RM to create a task blocking
* mechanism allowing a RM instance to block when it