diff options
Diffstat (limited to 'flash.c')
-rw-r--r-- | flash.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -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); } |