1/* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16/** 17 ************************************************************************ 18 * @file M4OSA_Mutex.h 19 * @ingroup OSAL 20 * @brief mutex API 21 ************************************************************************ 22*/ 23 24 25#ifndef M4OSA_MUTEX_H 26#define M4OSA_MUTEX_H 27 28#include "M4OSA_Types.h" 29#include "M4OSA_Error.h" 30 31 32#ifdef __cplusplus 33extern "C" 34{ 35 36#endif 37 38M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_mutexOpen( M4OSA_Context* context ); 39 40 41M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_mutexLock( M4OSA_Context context, 42 M4OSA_UInt32 timeout ); 43 44 45M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_mutexUnlock( M4OSA_Context context ); 46 47 48M4OSAL_REALTIME_EXPORT_TYPE M4OSA_ERR M4OSA_mutexClose( M4OSA_Context context ); 49 50#ifdef __cplusplus 51} 52#endif 53 54 55#endif /*M4OSA_MUTEX_H*/ 56 57