Shware Systems <shwares...@aol.com> wrote, on 17 Apr 2019: > > On Wednesday, April 17, 2019 Geoff Clare <g...@opengroup.org> wrote: > >> ... does anyone know of an implementation >> that has pthreads and C11/C17 threads, with pthread_t and thrd_t defined >> as different types? > > My implementation defines both as pointers, not int's, as 'typedef > thrd_t pthread_t;'. Since threads.h is 99% a subset of pthreads.h, > I see no reason to have them be different types, even as a breaking > change. What is missing is in pthreads.h, to account for the new > attributes C11 introduced, at least to mention them if support > isn't going to be added.
What new attributes? As far as I can see the only attribute a thread has in C17 (although it doesn't use that word) is whether it has been detached. > The major hassle I see is POSIX wants the > the threading stuff in libpthread, and C11 wants it in libc if the > threading option is enabled. IMO C11 should have let interfaces in > optional headers all be in header-specific libraries or libc, as an > implentation-defined choice, but they didn't. Last I knew the C standard says nothing at all about how programs are built. -- Geoff Clare <g.cl...@opengroup.org> The Open Group, Apex Plaza, Forbury Road, Reading, RG1 1AX, England