From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12110 invoked by alias); 11 Feb 2002 12:10:10 -0000 Mailing-List: contact ecos-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@sources.redhat.com Received: (qmail 11862 invoked from network); 11 Feb 2002 12:09:51 -0000 Received: from unknown (HELO rubicon.hasler.ascom.ch) (139.79.129.1) by sources.redhat.com with SMTP; 11 Feb 2002 12:09:51 -0000 Received: from eiger.ma.tech.ascom.ch (eiger.ma.tech.ascom.ch [139.79.100.1]) by rubicon.hasler.ascom.ch (8.11.4/8.11.4) with ESMTP id g1BC9lJ28539; Mon, 11 Feb 2002 13:09:47 +0100 (MET) Received: from biferten.ma.tech.ascom.ch ([139.79.100.27]) by eiger.ma.tech.ascom.ch with smtp (Exim 3.16 #1) id 16aFHC-0005WQ-00; Mon, 11 Feb 2002 13:09:43 +0100 Received: by biferten.ma.tech.ascom.ch (SMI-8.6/SMI-SVR4) id NAA26902; Mon, 11 Feb 2002 13:09:32 +0100 Date: Mon, 11 Feb 2002 04:10:00 -0000 From: Andrew Lunn To: Stijn Symons Cc: ecos-discuss Message-ID: <20020211130932.W26360@biferten.ma.tech.ascom.ch> Mail-Followup-To: Stijn Symons , ecos-discuss References: <3C67B1CC.8D39A6E@acunia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C67B1CC.8D39A6E@acunia.com>; from stijn.symons@acunia.com on Mon, Feb 11, 2002 at 12:58:04PM +0100 X-Filter-Version: 1.6 (rubicon) Subject: Re: [ECOS] cyg_semaphore_post X-SW-Source: 2002-02/txt/msg00217.txt.bz2 On Mon, Feb 11, 2002 at 12:58:04PM +0100, Stijn Symons wrote: > Will the cyg_semaphore_post function still increment the count if there > are threads waiting on it, or does it only wake up a thread? > And witch thread does it wake up, the one with the highest priority or > just random? The documentation says: "If there are threads waiting on this semaphore this will make exactly one of then. Otherwise it simply increments the semaphore count". So that answers 1/2 of your question. Reading the code, it looks like post takes from the head of the queue. It does not look like the queue is prioritized. Thinking about it, i'm not sure priorities make sense. Could you explain what you mean and how you would use them. Andrew Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos and search the list archive: http://sources.redhat.com/ml/ecos-discuss