Mistake on this page?
Report an issue in GitHub or email us
Public Member Functions
PlatformMutex Class Reference

The PlatformMutex class is used to synchronize the execution of threads. More...

#include <PlatformMutex.h>

Inheritance diagram for PlatformMutex:
NonCopyable< PlatformMutex >

Public Member Functions

 PlatformMutex ()
 Create a PlatformMutex object. More...
 
 ~PlatformMutex ()
 PlatformMutex destructor. More...
 
void lock ()
 Wait until a PlatformMutex becomes available. More...
 
void unlock ()
 Unlock a PlatformMutex that the same thread has previously locked. More...
 

Detailed Description

The PlatformMutex class is used to synchronize the execution of threads.

Mbed drivers use the PlatformMutex class instead of rtos::Mutex. This enables the use of drivers when the Mbed OS is compiled without the RTOS.

Note
  • When the RTOS is present, the PlatformMutex becomes a typedef for rtos::Mutex.
  • When the RTOS is absent, all methods are defined as noop.

Definition at line 47 of file PlatformMutex.h.

Constructor & Destructor Documentation

Create a PlatformMutex object.

Note
When the RTOS is present, this is an alias for rtos::Mutex::Mutex().

Definition at line 53 of file PlatformMutex.h.

PlatformMutex destructor.

Note
When the RTOS is present, this is an alias for rtos::Mutex::~Mutex().

Definition at line 61 of file PlatformMutex.h.

Member Function Documentation

void lock ( void  )

Wait until a PlatformMutex becomes available.

Note
  • When the RTOS is present, this is an alias for rtos::Mutex::lock().
  • When the RTOS is absent, this is a noop.

Definition at line 71 of file PlatformMutex.h.

void unlock ( void  )

Unlock a PlatformMutex that the same thread has previously locked.

Note
  • When the RTOS is present, this is an alias for rtos::Mutex::unlock().
  • When the RTOS is absent, this is a noop.

Definition at line 81 of file PlatformMutex.h.

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.