Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news-peer.in.tum.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Markus Elfring Newsgroups: comp.lang.c,comp.programming.threads Subject: Re: Trivial C11 threads.h wrapper (public domain) Date: Sun, 30 Sep 2012 23:13:40 +0200 Lines: 21 Message-ID: <5068B604.9020606@web.de> References: <5065EAFD.1050102@loria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Trace: individual.net 72f4un7Ix3YA/njyb1PBlga9VDcu+ORH0UacpJ5bNvNBuJ/wN0J+Rq19P5tQLE2xlH Cancel-Lock: sha1:1Fu0LPoihquwNAoek5o/iHnUCSk= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 In-Reply-To: <5065EAFD.1050102@loria.fr> Xref: csiph.com comp.lang.c:26910 comp.programming.threads:1128 > 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? Regards, Markus