takashi kadono / Mbed OS Nucleo_446

Dependencies:   ssd1331

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers PlatformMutex.h Source File

PlatformMutex.h

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