diff options
author | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-17 08:15:39 -0400 |
---|---|---|
committer | Michael J. Chudobiak <mjc@avtechpulse.com> | 2012-10-17 08:15:39 -0400 |
commit | 8b369f263f10de056c3633806a7f1ed87e2b7145 (patch) | |
tree | 8a0d9c4ed35663da416abb08412eb0aa920ba697 /flash.c | |
parent | b4a429729774f91ff259fe17d256b00134bc9f1f (diff) |
init threading properly, added more mutex locks
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); } |