xref: /utopia/UTPA2-700.0.x/modules/mvop/drv/mvop/osalMVOP.c (revision 53ee8cc121a030b8d368113ac3e966b4705770ef)
1 ////////////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (c) 2008-2009 MStar Semiconductor, Inc.
4 // All rights reserved.
5 //
6 // Unless otherwise stipulated in writing, any and all information contained
7 // herein regardless in any format shall remain the sole proprietary of
8 // MStar Semiconductor Inc. and be kept in strict confidence
9 // ("MStar Confidential Information") by the recipient.
10 // Any unauthorized act including without limitation unauthorized disclosure,
11 // copying, use, reproduction, sale, distribution, modification, disassembling,
12 // reverse engineering and compiling of the contents of MStar Confidential
13 // Information is unlawful and strictly prohibited. MStar hereby reserves the
14 // rights to any and all damages, losses, costs and expenses resulting therefrom.
15 //
16 ////////////////////////////////////////////////////////////////////////////////
17 
18 ////////////////////////////////////////////////////////////////////////////////////////////////////
19 // file   osalMVOP.c
20 // @brief  HVD Driver Interface
21 // @author MStar Semiconductor,Inc.
22 ////////////////////////////////////////////////////////////////////////////////////////////////////
23 
24 #include "MsCommon.h"
25 #include "osalMVOP.h"
26 
27 // Mutex
OSAL_MVOP_MutexCreate(MS_U8 * pu8Name)28 inline MS_S32 OSAL_MVOP_MutexCreate(MS_U8* pu8Name)
29 {
30     return MsOS_CreateMutex(E_MSOS_FIFO, (char *)pu8Name, MSOS_PROCESS_SHARED);
31 }
32 
OSAL_MVOP_MutexObtain(MS_S32 s32MutexId,MS_U32 u32Timeout)33 inline MS_BOOL OSAL_MVOP_MutexObtain(MS_S32 s32MutexId, MS_U32 u32Timeout)
34 {
35     return MsOS_ObtainMutex(s32MutexId, u32Timeout);
36 }
37 
OSAL_MVOP_MutexRelease(MS_S32 s32MutexId)38 inline MS_BOOL OSAL_MVOP_MutexRelease(MS_S32 s32MutexId)
39 {
40     return MsOS_ReleaseMutex(s32MutexId);
41 }
42 
OSAL_MVOP_MutexDelete(MS_S32 s32MutexId)43 inline MS_BOOL OSAL_MVOP_MutexDelete(MS_S32 s32MutexId)
44 {
45     return MsOS_DeleteMutex(s32MutexId);
46 }
47 
48