Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!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: Thu, 27 Sep 2012 13:45:46 +0200 Lines: 18 Message-ID: <50643C6A.6020609@web.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Trace: individual.net rskChfcYyPCvM8calgm+ywkMPQJSXgzd/KwL+yZcaG47t6/Z07I529kbdIQjlnxmta Cancel-Lock: sha1:sf+jvc+STV8+5On24+loS7HmeVQ= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 In-Reply-To: Xref: csiph.com comp.lang.c:26724 comp.programming.threads:1096 > So, I wrote a trivial C11 thread wrapper over POSIX threads, and > released it in the public domain just in case anyone is itching to use > standard C threading in a new project just like me: I have looked at your source file. https://github.com/jtsiomb/c11threads/blob/1fa0de734e204c1096d0dabac84d0c4497318944/c11threads.h I suggest to consider the following implementation details a bit more. 1. Would you like to provide a "typedef" for each enumeration? 2. How do you think about to complete error detection and corresponding exception handling? 2.1 Mapping of error codes from the POSIX thread interface to the values that are specified by the current standard for the C programming language. 2.2 pthread_mutexattr_init/destroy Regards, Markus