Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Jens Gustedt Newsgroups: comp.lang.c,comp.programming.threads Subject: Re: Trivial C11 threads.h wrapper (public domain) Date: Tue, 02 Oct 2012 14:48:38 +0200 Organization: A noiseless patient Spider Lines: 28 Message-ID: <506AE2A6.5090203@loria.fr> References: <5065EAFD.1050102@loria.fr> <5068B604.9020606@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="a5c18addaa58cf05a8c5d627b8257be9"; logging-data="11520"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+XzpYtAyJ5O/OQ6YCdoVVN7xO1SrmTVtg=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120912 Thunderbird/15.0.1 In-Reply-To: <5068B604.9020606@web.de> Cancel-Lock: sha1:D1DueMcUNmWMWgEcpAzyV6iAvsI= Xref: csiph.com comp.lang.c:26949 comp.programming.threads:1160 Am 30.09.2012 23:13, schrieb Markus Elfring: >> There is already an implementation of C11 threads as a wrapper around >> POSIX threads that is publicly available. > > I would interpret source code like the following as an update candidate. > > http://p99.gforge.inria.fr/p99-html/p99__threads_8h_source.html : > ... > 00633 // 7.26.4 Mutex functions > 00634 > 00638 p99_inline > 00639 void mtx_destroy(mtx_t *p00_mtx) { > 00640 (void)pthread_mutex_destroy(&P99_ENCP(p00_mtx)); > 00641 } > ... > > > How do think about to get rid of the cast to the return type "void" in such use > cases? Ok, the discussion that followed this have conviced me that we are facing a defect of the C11 specification here. I have written up my ideas about that and added the report to my list on http://p99.gforge.inria.fr/defects-and-improvements Jens