summaryrefslogtreecommitdiff
path: root/flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'flash.c')
-rw-r--r--flash.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/flash.c b/flash.c
index 5228bc5..7fd5bb8 100644
--- a/flash.c
+++ b/flash.c
@@ -295,9 +295,8 @@ void writeUserBlock(FlashStruct *mem, int addr, int numbytes)
// *** that the main file is valid before backing it up I guess... ***
// *** but I don't think this situation should arise. ***
- static GMutex mutex;
-
- g_mutex_lock (&mutex);
+ static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
+ g_static_mutex_lock (&mutex);
if (!globals.Flags.flash_writes_suspended) {
@@ -325,7 +324,7 @@ void writeUserBlock(FlashStruct *mem, int addr, int numbytes)
}
}
- g_mutex_unlock (&mutex);
+ g_static_mutex_unlock (&mutex);
}