Defines
RM OS Abstraction Layer API
Resource Manager API

Defines

#define Rm_osalMalloc   Osal_rmMalloc
 The macro is used by RM to allocate memory of specified size.
#define Rm_osalFree   Osal_rmFree
 The macro is used by RM to free a allocated block of memory.
#define Rm_osalCsEnter   Osal_rmCsEnter
 The function is used to enter a critical section. Function protects against.
#define Rm_osalCsExit   Osal_rmCsExit
 The function is used to exit a critical section protected using Osal_rmCsEnter() API.
#define Rm_osalBeginMemAccess   Osal_rmBeginMemAccess
 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.
#define Rm_osalEndMemAccess   Osal_rmEndMemAccess
 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.
#define Rm_osalTaskBlockCreate   Osal_rmTaskBlockCreate
 The macro is used by RM to create a task blocking mechanism allowing a RM instance to block when it has not been provided a service callback function and it must send a packet to remote RM instance to complete a service.
#define Rm_osalTaskBlock   Osal_rmTaskBlock
 The macro is used by a RM instance to block when it has not been provided a service callback function and it must send a packet to remote RM instance to complete a service. The blocking operation should block the current RM instance's task/thread from executing until a task/thread from which the RM receive code runs unblocks the RM instance.
#define Rm_osalTaskUnblock   Osal_rmTaskUnblock
 The macro is used by a RM instance to unblock from a previous block operation.
#define Rm_osalTaskBlockDelete   Osal_rmTaskBlockDelete
 The macro is used by a RM instance to delete its task blocking mechanism.
#define Rm_osalLog   Osal_rmLog
 The macro is used by RM to log various messages.

Define Documentation

#define Rm_osalBeginMemAccess   Osal_rmBeginMemAccess

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.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_rmBeginMemAccess (void *ptr, uint32_t size)
    

Parameter
Address of memory block
Size of memory block

Return Value
Not applicable.

#define Rm_osalCsEnter   Osal_rmCsEnter

The function is used to enter a critical section. Function protects against.

access from multiple cores and access from multiple threads on single core

Prototype: The following is the C prototype for the expected OSAL API.

       void *Osal_rmCsEnter (void)
    

Parameter
Not applicable.

Return Value
Handle used to lock critical section

#define Rm_osalCsExit   Osal_rmCsExit

The function is used to exit a critical section protected using Osal_rmCsEnter() API.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_rmCsExit (void *CsHandle)
    

Parameter
Handle for unlocking critical section.

Return Value
Not applicable.

#define Rm_osalEndMemAccess   Osal_rmEndMemAccess

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.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_rmEndMemAccess (void *ptr, uint32_t size)
    

Parameter
Address of memory block
Size of memory block

Return Value
Not applicable.

#define Rm_osalFree   Osal_rmFree

The macro is used by RM to free a allocated block of memory.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_rmFree (void *ptr, uint32_t size)
    

Parameter
Pointer to the block of memory to be cleaned up.
Size of the allocated memory which is being freed.

Return Value
Not applicable.

#define Rm_osalLog   Osal_rmLog

The macro is used by RM to log various messages.

Prototype: The following is the C prototype for the expected OSAL API.

       void Osal_rmLog( char *fmt, ... ) 
    

Parameter
printf-style format string

Return Value
Not applicable.

#define Rm_osalMalloc   Osal_rmMalloc

The macro is used by RM to allocate memory of specified size.

Prototype: The following is the C prototype for the expected OSAL API.

       void* Osal_rmMalloc (uint32_t numBytes)
    

Parameter
Number of bytes to be allocated

Return Value
Pointer to the allocated block size

#define Rm_osalTaskBlock   Osal_rmTaskBlock

The macro is used by a RM instance to block when it has not been provided a service callback function and it must send a packet to remote RM instance to complete a service. The blocking operation should block the current RM instance's task/thread from executing until a task/thread from which the RM receive code runs unblocks the RM instance.

Prototype: The following is the C prototype for the expected OSAL API.

       void  Osal_rmTaskBlock (void *handle)
    

Parameter
Task blocking mechanism handle cast as a void pointer

Return Value
Not applicable.

#define Rm_osalTaskBlockCreate   Osal_rmTaskBlockCreate

The macro is used by RM to create a task blocking mechanism allowing a RM instance to block when it has not been provided a service callback function and it must send a packet to remote RM instance to complete a service.

Prototype: The following is the C prototype for the expected OSAL API.

       void *Osal_rmTaskBlockCreate (void)
    

Parameter
Not applicable.

Return Value
Task blocking mechanism handle cast as a void pointer

#define Rm_osalTaskBlockDelete   Osal_rmTaskBlockDelete

The macro is used by a RM instance to delete its task blocking mechanism.

Prototype: The following is the C prototype for the expected OSAL API.

       void  Osal_rmTaskBlockDelete (void *handle)
    

Parameter
Task blocking mechanism handle cast as a void pointer

Return Value
Not applicable.

#define Rm_osalTaskUnblock   Osal_rmTaskUnblock

The macro is used by a RM instance to unblock from a previous block operation.

Prototype: The following is the C prototype for the expected OSAL API.

       void  Osal_rmTaskUnblock (void *handle)
    

Parameter
Task blocking mechanism handle cast as a void pointer

Return Value
Not applicable.


Copyright 2014, Texas Instruments Incorporated