summaryrefslogtreecommitdiff
path: root/src/thread/PosixMutex.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/thread/PosixMutex.hxx')
-rw-r--r--src/thread/PosixMutex.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/thread/PosixMutex.hxx b/src/thread/PosixMutex.hxx
index c3f2ac23f..7042dc8ec 100644
--- a/src/thread/PosixMutex.hxx
+++ b/src/thread/PosixMutex.hxx
@@ -48,11 +48,11 @@ public:
#else
/* slow fallback for pthread implementations that are not
compatible with "constexpr" */
- PosixMutex() {
+ PosixMutex() noexcept {
pthread_mutex_init(&mutex, nullptr);
}
- ~PosixMutex() {
+ ~PosixMutex() noexcept {
pthread_mutex_destroy(&mutex);
}
#endif
@@ -60,15 +60,15 @@ public:
PosixMutex(const PosixMutex &other) = delete;
PosixMutex &operator=(const PosixMutex &other) = delete;
- void lock() {
+ void lock() noexcept {
pthread_mutex_lock(&mutex);
}
- bool try_lock() {
+ bool try_lock() noexcept {
return pthread_mutex_trylock(&mutex) == 0;
}
- void unlock() {
+ void unlock() noexcept {
pthread_mutex_unlock(&mutex);
}
};