mbed source development branch
Fork of mbed-dev by
Embed:
(wiki syntax)
Show/hide line numbers
PlatformMutex.h
00001 00002 /** \addtogroup platform */ 00003 /** @{*/ 00004 /* mbed Microcontroller Library 00005 * Copyright (c) 2006-2013 ARM Limited 00006 * 00007 * Licensed under the Apache License, Version 2.0 (the "License"); 00008 * you may not use this file except in compliance with the License. 00009 * You may obtain a copy of the License at 00010 * 00011 * http://www.apache.org/licenses/LICENSE-2.0 00012 * 00013 * Unless required by applicable law or agreed to in writing, software 00014 * distributed under the License is distributed on an "AS IS" BASIS, 00015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00016 * See the License for the specific language governing permissions and 00017 * limitations under the License. 00018 */ 00019 #ifndef PLATFORM_MUTEX_H 00020 #define PLATFORM_MUTEX_H 00021 00022 #ifdef MBED_CONF_RTOS_PRESENT 00023 #include "rtos/Mutex.h" 00024 typedef rtos::Mutex PlatformMutex; 00025 #else 00026 /** A stub mutex for when an RTOS is not present 00027 */ 00028 class PlatformMutex { 00029 public: 00030 PlatformMutex() { 00031 // Stub 00032 00033 } 00034 ~PlatformMutex() { 00035 // Stub 00036 } 00037 00038 void lock() { 00039 // Do nothing 00040 } 00041 00042 void unlock() { 00043 // Do nothing 00044 } 00045 }; 00046 00047 #endif 00048 00049 #endif 00050 00051 /** @}*/
Generated on Tue Jul 12 2022 19:34:53 by 1.7.2