summaryrefslogtreecommitdiff
path: root/core/os/rw_lock.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/os/rw_lock.h')
-rw-r--r--core/os/rw_lock.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/core/os/rw_lock.h b/core/os/rw_lock.h
index 64dfbef20c..2ef4df9b70 100644
--- a/core/os/rw_lock.h
+++ b/core/os/rw_lock.h
@@ -58,10 +58,12 @@ class RWLockRead {
public:
RWLockRead(const RWLock *p_lock) {
lock = const_cast<RWLock *>(p_lock);
- if (lock) lock->read_lock();
+ if (lock)
+ lock->read_lock();
}
~RWLockRead() {
- if (lock) lock->read_unlock();
+ if (lock)
+ lock->read_unlock();
}
};
@@ -72,10 +74,12 @@ class RWLockWrite {
public:
RWLockWrite(RWLock *p_lock) {
lock = p_lock;
- if (lock) lock->write_lock();
+ if (lock)
+ lock->write_lock();
}
~RWLockWrite() {
- if (lock) lock->write_unlock();
+ if (lock)
+ lock->write_unlock();
}
};