freemyipod r168 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r167‎ | r168 | r169 >
Date:22:17, 21 August 2010
Author:theseven
Status:new
Tags:
Comment:
Fix a bunch of mutex deadlocks in the button code
Modified paths:
  • /embios/trunk/button.c (modified) (history)

Diff [purge]

Index: embios/trunk/button.c
@@ -52,6 +52,7 @@
5353 button_hooks[i].owner = current_thread;
5454 button_hooks[i].handler = handler;
5555 return 0;
 56+ mutex_unlock(&button_mutex);
5657 }
5758 mutex_unlock(&button_mutex);
5859 return -1;
@@ -66,6 +67,7 @@
6768 {
6869 button_hooks[i].owner = NULL;
6970 button_hooks[i].handler = NULL;
 71+ mutex_unlock(&button_mutex);
7072 return 0;
7173 }
7274 mutex_unlock(&button_mutex);
@@ -89,6 +91,7 @@
9092 {
9193 button_hooks[i].owner = NULL;
9294 button_hooks[i].handler = NULL;
 95+ mutex_unlock(&button_mutex);
9396 }
9497 mutex_unlock(&button_mutex);
9598 }