public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RE: How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s...
@ 2006-03-02 12:55 oli
  0 siblings, 0 replies; only message in thread
From: oli @ 2006-03-02 12:55 UTC (permalink / raw)
  To: derek.bouius; +Cc: bartv, Andrew Lunn, oliver munz @ s p e a g, ecos-discuss

I tested the following Patch from Bart Veer and it works. Please update the 
CVS...
Index: usbs.c
===================================================================
RCS file: /cvs/ecos/ecos/packages/io/usb/slave/current/src/usbs.c,v
retrieving revision 1.5
diff -u -r1.5 usbs.c
--- usbs.c	23 May 2002 23:06:36 -0000	1.5
+++ usbs.c	20 Feb 2006 13:37:06 -0000
@@ -111,9 +111,11 @@
     (*endpoint->start_tx_fn)(endpoint);

     cyg_drv_mutex_lock(&wait.lock);
+    cyg_drv_dsr_lock();
     while (!wait.completed) {
         cyg_drv_cond_wait(&wait.signal);
     }
+    cyg_drv_dsr_unlock();
     cyg_drv_mutex_unlock(&wait.lock);
     if (wait.result < 0) {
         result = wait.result;
@@ -155,9 +157,11 @@
     endpoint->complete_data     = (void*) &wait;
     (*endpoint->start_rx_fn)(endpoint);
     cyg_drv_mutex_lock(&wait.lock);
+    cyg_drv_dsr_lock();
     while (!wait.completed) {
         cyg_drv_cond_wait(&wait.signal);
     }
+    cyg_drv_dsr_unlock();
     cyg_drv_mutex_unlock(&wait.lock);
     if (wait.result < 0) {
         result = wait.result;


Oliver 


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-03-02 12:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-03-02 12:55 [ECOS] RE: How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s oli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).