From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32189 invoked by alias); 23 Dec 2009 16:01:46 -0000 Received: (qmail 32046 invoked by uid 22791); 23 Dec 2009 16:01:44 -0000 X-SWARE-Spam-Status: No, hits=-0.5 required=5.0 tests=BAYES_00,RCVD_NUMERIC_HELO,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Dec 2009 16:01:36 +0000 Received: from list by lo.gmane.org with local (Exim 4.50) id 1NNTeN-0001Qc-H7 for ecos-discuss@sources.redhat.com; Wed, 23 Dec 2009 17:01:23 +0100 Received: from 74.5.89.130 ([74.5.89.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Dec 2009 17:01:23 +0100 Received: from grant.b.edwards by 74.5.89.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 23 Dec 2009 17:01:23 +0100 To: ecos-discuss@sources.redhat.com From: Grant Edwards Date: Wed, 23 Dec 2009 16:01:00 -0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: slrn/pre0.9.9-102 (Linux) X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: [ECOS] Re: Question about cyg_flag_timed_wait() X-SW-Source: 2009-12/txt/msg00043.txt.bz2 On 2009-11-02, Grant Edwards wrote: > A colleague working on an eCos app is reporting that > cyg_flag_timed_wait() doesn't resume immediately when the flag > is set. He says it won't resume until the next system tick > (which results in a delay of up to 10ms). So instead he uses > cyg_thread_delay() and cyg_thread_release() and claims that the > released thread starts immediately in that case. This "problem" seems to have come up again. I've looked at the event flag code, and I can't see how there could be a delay when waking a thread using cyg_thread_setbits() and not when waking a thread using cyg_thread_release(). Both cases just end up calling the target thread's wake() method. The only difference is that cyg_thread_release() calls wake() unconditionally, and cyg_thread_setbits() only calls it if the target thread is in the flag's waitqueue. I'm not wrong am I? -- Grant Edwards grante Yow! What GOOD is a at CARDBOARD suitcase ANYWAY? visi.com -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss