|
Friendly LWM2M client
|
The WppGuard class provides a linker callback class that must be implemented by the user. More...
#include <WppGuard.h>
Collaboration diagram for wpp::WppGuard:Public Member Functions | |
| WppGuard () | |
| Constructs a WppGuard object. More... | |
| ~WppGuard () | |
| Destructs the WppGuard object. More... | |
| void | lock () |
| Locks the guard object. More... | |
| void | unlock () |
| Unlocks the guard object. More... | |
| bool | try_lock () |
| Tries to lock the guard object. More... | |
The WppGuard class provides a linker callback class that must be implemented by the user.
The WppGuard class is responsible for providing synchronization mechanisms for accessing shared resources. It provides methods to lock, unlock, and try_lock the guard object. The user must implement these methods according to their specific synchronization requirements.
Definition at line 14 of file WppGuard.h.
| wpp::WppGuard::WppGuard | ( | ) |
Constructs a WppGuard object.
| wpp::WppGuard::~WppGuard | ( | ) |
Destructs the WppGuard object.
| void wpp::WppGuard::lock | ( | ) |
Locks the guard object.
This method is used to acquire the lock on the guard object. If the lock is already acquired by another thread, the calling thread will be blocked until the lock is released.
Here is the caller graph for this function:| bool wpp::WppGuard::try_lock | ( | ) |
Tries to lock the guard object.
This method is used to try to acquire the lock on the guard object. If the lock is already acquired by another thread, this method will return false immediately without blocking the calling thread. If the lock is successfully acquired, this method will return true.
Here is the caller graph for this function:| void wpp::WppGuard::unlock | ( | ) |
Unlocks the guard object.
This method is used to release the lock on the guard object. It should be called after the critical section is completed to allow other threads to acquire the lock.
Here is the caller graph for this function: