2021-11-12 10:00:41 +01:00
|
|
|
#include "shared_resource.h"
|
|
|
|
|
2022-02-04 13:53:30 +01:00
|
|
|
void SharedResource::read_lock() {
|
|
|
|
_lock.read_lock();
|
2021-11-12 10:00:41 +01:00
|
|
|
}
|
2022-02-04 13:53:30 +01:00
|
|
|
void SharedResource::read_unlock() {
|
|
|
|
_lock.read_unlock();
|
|
|
|
}
|
|
|
|
Error SharedResource::read_try_lock() {
|
|
|
|
return _lock.read_try_lock();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SharedResource::write_lock() {
|
|
|
|
_lock.write_lock();
|
|
|
|
}
|
|
|
|
void SharedResource::write_unlock() {
|
|
|
|
_lock.write_unlock();
|
|
|
|
}
|
|
|
|
Error SharedResource::write_try_lock() {
|
|
|
|
return _lock.write_try_lock();
|
2021-11-12 10:00:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
SharedResource::SharedResource() :
|
|
|
|
Resource() {
|
|
|
|
}
|
|
|
|
|
|
|
|
SharedResource::~SharedResource() {
|
|
|
|
}
|