Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin3!goblin.stu.neva.ru!news.tu-darmstadt.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: Mon, 01 Oct 2012 11:25:39 +0200 Lines: 30 Message-ID: <50696193.3090503@web.de> References: <5065EAFD.1050102@loria.fr> <5068B604.9020606@web.de> <5068C9C3.6090502@loria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net AR2jWGwIA1evnCCIipLyFAscrMMTVTk8kPR5iFv33kvnZd/HzUcRRFxl0Rf7rbtZ57 Cancel-Lock: sha1:UJ92gq9whgWhsA3zdNVOnTEPPJE= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 In-Reply-To: <5068C9C3.6090502@loria.fr> Xref: csiph.com comp.lang.c:26923 comp.programming.threads:1134 > Exactly, in particular there are some linux systems where the headers > are annotated with gcc extensions that make it difficult to ignore the > return of a system function. I would appreciate if such return value ignorance can be avoided. http://stackoverflow.com/questions/12416604/failing-compilation-if-return-value-is-unused-for-a-certain-type#12416677 > And then, finally, the C11 standard leaves no way to get semantic of a > failed call accros, here. I find this information questionable. I get the impression from one of your articles that you know also alternative approaches. http://gustedt.wordpress.com/2012/07/15/capture-return-codes-from-library-functions/ > Do you see a way to use the return value in some way? Yes, of course! ;-) How do think about to forward the error code to a log message for a file like "stderr" eventually? Would you like to call the function "abort" if a function call like "pthread_mutex_destroy" failed? Is the completion of error detection and corresponding exception handling an open issue also in the affected wrapper implementation? Regards, Markus