Mistake on this page?
Report an issue in GitHub or email us
PlatformMutex.h
1 
2 /** \addtogroup platform */
3 /** @{*/
4 /**
5  * \defgroup platform_PlatformMutex PlatformMutex class
6  * @{
7  */
8 /* mbed Microcontroller Library
9  * Copyright (c) 2006-2013 ARM Limited
10  *
11  * Licensed under the Apache License, Version 2.0 (the "License");
12  * you may not use this file except in compliance with the License.
13  * You may obtain a copy of the License at
14  *
15  * http://www.apache.org/licenses/LICENSE-2.0
16  *
17  * Unless required by applicable law or agreed to in writing, software
18  * distributed under the License is distributed on an "AS IS" BASIS,
19  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20  * See the License for the specific language governing permissions and
21  * limitations under the License.
22  */
23 #ifndef PLATFORM_MUTEX_H
24 #define PLATFORM_MUTEX_H
25 
26 #include "platform/NonCopyable.h"
27 
28 #ifdef MBED_CONF_RTOS_PRESENT
29 #include "rtos/Mutex.h"
31 #else
32 /** A stub mutex for when an RTOS is not present
33 */
34 class PlatformMutex : private mbed::NonCopyable<PlatformMutex> {
35 public:
37  {
38  // Stub
39 
40  }
41  ~PlatformMutex()
42  {
43  // Stub
44  }
45 
46  void lock()
47  {
48  // Do nothing
49  }
50 
51  void unlock()
52  {
53  // Do nothing
54  }
55 };
56 
57 #endif
58 
59 #endif
60 
61 /**@}*/
62 
63 /**@}*/
Definition: NonCopyable.h:150
Definition: PlatformMutex.h:34
Definition: Mutex.h:65
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.