From 700d4bbcbf59c4447becbab21a6aa7204a8da2f4 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 6 Nov 2024 16:01:36 -0800 Subject: I believe MyriadFs is now threadsafe. It could probably be more optimized, but it does work. --- src/stable/mutex.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/stable') diff --git a/src/stable/mutex.h b/src/stable/mutex.h index d9e8910..8034974 100644 --- a/src/stable/mutex.h +++ b/src/stable/mutex.h @@ -33,7 +33,7 @@ namespace Bu * wait for the mutex to unlock, the odds of which are usually farily * low at deconstruction time. */ - ~Mutex(); + virtual ~Mutex(); /** * Lock the mutex. This causes all future calls to lock on this @@ -44,13 +44,13 @@ namespace Bu * computation within a locked section. This can cause thread-deadlock * and your program may hang. */ - int lock(); + virtual int lock(); /** * Unlock the mutex. This allows the next thread that asked for a lock * to lock the mutex and continue with execution. */ - int unlock(); + virtual int unlock(); /** * Try to lock the mutex. This is the option to go with if you cannot @@ -58,7 +58,7 @@ namespace Bu * will attempt to lock the mutex, if the mutex is already locked this * function returns immediately with an error code. */ - int trylock(); + virtual int trylock(); protected: pthread_mutex_t mutex; /**< The internal mutex reference. */ -- cgit v1.2.3