freemyipod r214 - Code Review

Jump to: navigation, search
Repository:freemyipod
Revision:r213‎ | r214 | r215 >
Date:17:26, 8 October 2010
Author:theseven
Status:new
Tags:
Comment:
Make the console reading code unlock the right mutex.
Modified paths:
  • /embios/trunk/console.c (modified) (history)

Diff [purge]

Index: embios/trunk/console.c
@@ -145,7 +145,7 @@
146146 #ifdef HAVE_USB
147147 if ((consoles & 2) && (result = dbgconsole_getc(timeout)) != -1) return result;
148148 #endif
149 - mutex_unlock(&console_mutex);
 149+ mutex_unlock(&console_readmutex);
150150 }
151151
152152 int cread(unsigned int consoles, char* buffer, size_t length, int timeout)
@@ -155,7 +155,7 @@
156156 #ifdef HAVE_USB
157157 if ((consoles & 2) && (result = dbgconsole_read(buffer, length, timeout))) return result;
158158 #endif
159 - mutex_unlock(&console_mutex);
 159+ mutex_unlock(&console_readmutex);
160160 }
161161
162162 void creada(unsigned int consoles, char* buffer, size_t length, int timeout)
@@ -172,5 +172,5 @@
173173 }
174174 #endif
175175 }
176 - mutex_unlock(&console_mutex);
 176+ mutex_unlock(&console_readmutex);
177177 }