diff --git a/rm_osal.h b/rm_osal.h
index 12ed993d769e693d2acfb5ee5454425c7957cdbf..843b5edc0657d1318a3be83161b57841022b8017 100644 (file)
--- a/rm_osal.h
+++ b/rm_osal.h
* @file rm_osal.h
*
* @brief
- * This is the sample OS Adaptation layer which is used by the RM low level
- * driver. The OSAL layer can be ported in either of the following
+ * This is the sample OS Adaptation layer which is used by the Resource
+ * Manager. The OSAL layer can be ported in either of the following
* manners to a native OS:
*
* <b> Approach 1: </b>
*
* \par
* NOTE:
- * (C) Copyright 2012 Texas Instruments, Inc.
+ * (C) Copyright 2012-2013 Texas Instruments, Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
*
* \par
*/
-#ifndef __RM_OSAL_H__
-#define __RM_OSAL_H__
+#ifndef RM_OSAL_H_
+#define RM_OSAL_H_
-/** @addtogroup RM_LLD_OSAL
- @{ */
+/** @addtogroup RM_OSAL_API
+ @{
+ */
/**********************************************************************
************************* Extern Declarations ************************
**********************************************************************/
-/* #include <string.h> is here because there used to be
- * memcpy/memset prototypes here. This #include prevents warnings in
- * other code that unintentionally worked because of these prototypes
- */
-#include <xdc/runtime/System.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);
-extern void Osal_rmMtCsExit (void *CsHandle);
-//extern void Osal_rmLog (char *fmt, ... );
-extern void Osal_rmBeginMemAccess (void *ptr, uint32_t size);
-extern void Osal_rmEndMemAccess (void *ptr, uint32_t size);
+extern void *Osal_rmMalloc (uint32_t num_bytes);
+extern void Osal_rmFree (void *ptr, uint32_t size);
+extern uint32_t Osal_rmLocalGateEnter (void);
+extern void Osal_rmLocalGateLeave (uint32_t localGateKey);
+extern void Osal_rmLog (char *fmt, ... );
/**
- * @brief The macro is used by the RM LLD to allocate memory of specified
- * size
+ * @brief The macro is used by RM to allocate memory of specified
+ * size
*
* <b> Prototype: </b>
* The following is the C prototype for the expected OSAL API.
* <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_osalMalloc Osal_rmMalloc
/**
- * @brief The macro is used by the RM LLD to free a allocated block of
- * memory
+ * @brief The macro is used by RM to free a allocated block of
+ * memory
*
* <b> Prototype: </b>
* The following is the C prototype for the expected OSAL API.
* <b> Return Value </b>
* @n Not applicable.
*/
-
#define Rm_osalFree Osal_rmFree
-/**
- * @brief The macro is used by the RM LLD to provide critical sections to
- * protect global and shared variables from
- *
- * 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 None.
- *
- * <b> Return Value </b>
- * @n Handle used to lock critical section.
- */
-#define Rm_osalCsEnter Osal_rmCsEnter
+#define Rm_osalLocalGateEnter Osal_rmLocalGateEnter
-/**
- * @brief The macro is used by the RM LLD 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
+#define Rm_osalLocalGateLeave Osal_rmLocalGateLeave
/**
- * @brief The macro is used by the RM LLD to provide critical sections to
- * protect global and shared variables from
- *
- * 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)
- @endverbatim
- *
- * <b> Parameter </b>
- * @n None.
- *
- * <b> Return Value </b>
- * @n Handle used to lock critical section.
- */
-#define Rm_osalMtCsEnter Osal_rmMtCsEnter
-
-/**
- * @brief The macro is used by the RM LLD to exit a 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 *CsHandle)
- @endverbatim
- *
- * <b> Parameter </b>
- * @n Handle for unlocking critical section.
- *
- * <b> Return Value </b>
- * @n Not applicable.
- */
-#define Rm_osalMtCsExit Osal_rmMtCsExit
-
-/**
- * @brief The macro is used by the RM LLD to log various
- * messages.
+ * @brief The macro is used by RM to log various
+ * messages.
*
* <b> Prototype: </b>
* The following is the C prototype for the expected OSAL API.
* <b> Return Value </b>
* @n Not applicable.
*/
-#define Rm_osalLog System_printf
-
-/**
- * @brief The macro is used by the RM LLD 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 macro is used by the RM LLD 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
+#define Rm_osalLog Osal_rmLog
/**
@}
*/
-#endif /* __RM_OSAL_H__ */
+
+#endif /* RM_OSAL_H_ */