From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27122 invoked by alias); 17 Mar 2015 15:19:49 -0000 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 Received: (qmail 27110 invoked by uid 89); 17 Mar 2015 15:19:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=2.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-ig0-f177.google.com Received: from mail-ig0-f177.google.com (HELO mail-ig0-f177.google.com) (209.85.213.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 17 Mar 2015 15:19:47 +0000 Received: by igbue6 with SMTP id ue6so14960663igb.1 for ; Tue, 17 Mar 2015 08:19:45 -0700 (PDT) X-Received: by 10.43.163.71 with SMTP id mn7mr43887904icc.72.1426605585675; Tue, 17 Mar 2015 08:19:45 -0700 (PDT) Received: from grante (67-130-15-94.dia.static.qwest.net. [67.130.15.94]) by mx.google.com with ESMTPSA id ir10sm6044501igb.2.2015.03.17.08.19.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Mar 2015 08:19:45 -0700 (PDT) Date: Tue, 17 Mar 2015 15:19:00 -0000 From: Grant Edwards To: Frank Pagliughi Cc: ecos-discuss@ecos.sourceware.org Message-ID: <20150317151943.GA20827@grante> References: <5507F21B.1000900@zhaw.ch> <550840C2.8090900@mindspring.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <550840C2.8090900@mindspring.com> User-Agent: Mutt/1.5.23 (2014-03-12) Subject: Re: [ECOS] Re: Once again, I need a binary semaphore X-SW-Source: 2015-03/txt/msg00006.txt.bz2 On Tue, Mar 17, 2015 at 10:57:06AM -0400, Frank Pagliughi wrote: > I'm in agreement, for what it's worth. I've had to make use of the > binary semaphore through the C++ API, and it always made me wonder why > it wasn't brought out to the public/C API. I've been asking that for 15 years. OK, I exaggerate. I just looked itup and the first thread I started on this top was March 2001, so it's only been 14 years. The reason given for lack of a binary semaphore C API was: It was never intended that the KAPI be a complete reflection of the kernel implementation. It is meant to be a consistent, self-contained, small API that can be used by C applications. Like the uITRON and POSIX APIs it only exposes a subset. It was considered unnecessary to export binary semaphores, since a counting semaphore initialized to 1 is functionally equivalent. If I had had my way the KAPI would have been even more minimal that it currently is. -- Nick Garnett, eCos Kernel Architect Red Hat, Cambridge, UK Except a counting semaphore initialized to 1 is _not_ functionally equivalent to a binary semaphore in all cases. I pointed this out and provided examples of sequences of wait/post where the behavior differs, but was told those sequences were "bugs" and (jokingly, I hope) if I didn't shut up and stop asking questions then the C++ binary semaphores would be removed copletely. It was quite clear that Nick was adamantly opposed to providing a C API for binary semaphores and that the needs of eCos users' application code were to be overruled by his idea of what an comprised a minimal, complete, elegent set of C APIs: people who want to write/port C apps that use binary semaphores should just and rewrite the application code. IOW, all you really need are two-input NAND gates to model any Turing complete machine so stop bitching and get to work. -- Grant -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss