]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/rm-lld.git/blob - test/rm_osal.h
Coded basic test project started removing receipt construct
[keystone-rtos/rm-lld.git] / test / rm_osal.h
1 /**
2  *   @file  rm_osal.h
3  *
4  *   @brief   
5  *      This is the OS adaptation layer for the Resource Manager. This file should
6  *      be modified by the system integrator to their system/OS implementation
7  *      The file is provided as an 'example' template ported for XDC/BIOS.
8  *
9  *  \par
10  *  NOTE:
11  *      (C) Copyright 2009 Texas Instruments, Inc.
12  * 
13  *  Redistribution and use in source and binary forms, with or without 
14  *  modification, are permitted provided that the following conditions 
15  *  are met:
16  *
17  *    Redistributions of source code must retain the above copyright 
18  *    notice, this list of conditions and the following disclaimer.
19  *
20  *    Redistributions in binary form must reproduce the above copyright
21  *    notice, this list of conditions and the following disclaimer in the 
22  *    documentation and/or other materials provided with the   
23  *    distribution.
24  *
25  *    Neither the name of Texas Instruments Incorporated nor the names of
26  *    its contributors may be used to endorse or promote products derived
27  *    from this software without specific prior written permission.
28  *
29  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
30  *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
31  *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
32  *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
33  *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
34  *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
35  *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
36  *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
37  *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
38  *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
39  *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
40  *
41  *  \par
42 */
43 #ifndef __RM_OSAL_H__
44 #define __RM_OSAL_H__
46 extern void* Osal_rmMalloc (uint32_t num_bytes);
47 extern void Osal_rmFree (void *ptr, uint32_t size);
48 extern void* Osal_rmCsEnter (void);
49 extern void Osal_rmCsExit (void *CsHandle);
50 extern void* Osal_rmMtCsEnter (void);
51 extern void Osal_rmMtCsExit (void *CsHandle);
52 extern void Osal_rmBeginMemAccess (void *ptr, uint32_t size);
53 extern void Osal_rmEndMemAccess (void *ptr, uint32_t size);
55 /* RM LLD OSAL Memory Allocation API are redefined to TEST application API */
56 #define Rm_osalMalloc             Osal_rmMalloc
57 #define Rm_osalFree               Osal_rmFree
59 /* RM LLD OSAL Critical section and cache coherency APIs are used without redefinition in TEST application API */
60 #define Rm_osalCsEnter            Osal_rmCsEnter
61 #define Rm_osalCsExit             Osal_rmCsExit
62 #define Rm_osalMtCsEnter          Osal_rmMtCsEnter
63 #define Rm_osalMtCsExit           Osal_rmMtCsExit
64 #define Rm_osalBeginMemAccess     Osal_rmBeginMemAccess
65 #define Rm_osalEndMemAccess       Osal_rmEndMemAccess
67 /* RM LLD OSAL Logging API is mapped directly to an XDC Runtime API */
68 #define Rm_osalLog                System_printf
70 #endif /* __RM_OSAL_H__ */