From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12383 invoked by alias); 16 Feb 2006 20:20:37 -0000 Received: (qmail 12225 invoked by uid 22791); 16 Feb 2006 20:20:34 -0000 X-Spam-Check-By: sourceware.org Received: from otoro.itis.ethz.ch (HELO otoro.itis.ethz.ch) (129.132.24.2) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 16 Feb 2006 20:20:31 +0000 Received: from localhost (localhost [127.0.0.1]) by otoro.itis.ethz.ch (Postfix) with ESMTP id 1B8A75B38D; Thu, 16 Feb 2006 21:20:27 +0100 (MET) Received: from otoro.itis.ethz.ch ([127.0.0.1]) by localhost (otoro [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 27496-06-2; Thu, 16 Feb 2006 21:20:26 +0100 (MET) Received: from cadpad (itis-speag-090-dhcp.itis.ethz.ch [129.132.24.90]) by otoro.itis.ethz.ch (Postfix) with SMTP id 7DF715B38C; Thu, 16 Feb 2006 21:20:26 +0100 (MET) Message-ID: <01b401c63336$9cf8cf00$5a188481@haus.hellmutstrasse.ch> Reply-To: "oliver munz @ s p e a g" From: "oliver munz @ s p e a g" To: "Derek Bouius" , Cc: References: <20060216200721.WJOY10262.tomts22-srv.bellnexxia.net@derekwin> Date: Thu, 16 Feb 2006 20:20:00 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 0607-2, 16.02.2006), Outbound message X-Antivirus-Status: Clean Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s... X-SW-Source: 2006-02/txt/msg00168.txt.bz2 I think cyg_drv_dsr_lock() will block the loop, because You need the DSR to update the variable and to release the wait-funcion. I think, the best option may be to modify the condition cyg_drv_cond_wait() so, that it rememers an signal after the initialisation. If so, it would work fine. I don't know, where it is interessting to forget signals... Oliver ----- Original Message ----- From: "Derek Bouius" To: "'oliver munz @ s p e a g'" ; Cc: Sent: Thursday, February 16, 2006 9:07 PM Subject: RE: [ECOS] How to debug synchronisation in the usbs.c in a new usb-driver for the ARM at91sam7s... >I just tried implementing it with event flags, and it works fine too, with >no noticable performance difference. > > Gary, I have studied the different options but I can't determine why this > is a heavier solution. It seems like the only possible > one. > Any other method with condition variables ends up in a race condition > deadlock. (Please correct me if I'm wrong though!) > > Just doing some more reading about the cyg_drv_cond_wait()... "Note that > this function performs an implicit scheduler unlock/relock > sequence, so that it may be used within an explicit > cyg_drv_dsr_lock()...cyg_drv_dsr_unlock() structure." > What if we did the dsr_lock/unlock around the while loop? I'll have to try > it. > > Derek -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss