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 /device-functions.c | |
parent | b4a429729774f91ff259fe17d256b00134bc9f1f (diff) |
init threading properly, added more mutex locks
Diffstat (limited to 'device-functions.c')
-rw-r--r-- | device-functions.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/device-functions.c b/device-functions.c index 8e59686..726b782 100644 --- a/device-functions.c +++ b/device-functions.c @@ -4462,6 +4462,9 @@ void Set_Sav(int setting_num) void Main_update_shift_registers() { + static GStaticMutex mutex = G_STATIC_MUTEX_INIT; + g_static_mutex_lock (&mutex); + /* send MSB first, LSB last */ /* send highest # SR first */ @@ -4549,6 +4552,8 @@ void Main_update_shift_registers() globals.Changes.update_amp = 0; globals.Changes.update_zout = 0; globals.Changes.update_load = 0; + + g_static_mutex_unlock (&mutex); } |