3

I'm curious what the status of C11 implementations are, specifically in regard to the optional <threads.h>. Do any platforms currently support the interfaces? If not, are there any plans to implement the interfaces in terms of POSIX and/or WinAPI?

Is anyone else planning on using the interfaces described in C11 (thrd_t, mtx_t, cond_t, etc...)?

Jason
  • 3,777
  • 14
  • 27
  • In general. Linux, `x`BSD, OSX, Windows, etc... – Jason May 01 '14 at 01:21
  • 1
    Pelles C for Windows has complete c11 support. – this May 01 '14 at 01:22
  • 1
    I have implemented these features as shallow macros on top of POSIX threads in P99 (p99.gforge.inria.fr). So you don't have to wait for the compiler/library implementors to provide them for you. On Windows, there is the commercial library that was at the origin of the specification from the start (and for which I forgot the name.) – Jens Gustedt May 01 '14 at 05:51
  • http://gcc.gnu.org/wiki/C11Status: _ISO C11 support is now at a similar level of completeness to ISO C99 support._ – nosid May 01 '14 at 07:02
  • 1
    @nosid, if you look at the last entry, there, you'd just see that the threading part is not implemented, since it is mainly a library issue. – Jens Gustedt May 01 '14 at 11:25
  • @JensGustedt I also implemented a version of the `` interface using `pthreads`. It's mostly a one-to-one mapping, but it's probably not something I'd consider submitting as a patch for any of the platforms. I guess the consensus is 'if you're on a platform that relies on POSIX (Linux, BSD, OSX, etc...), you should plan to use a non-distribution [version](http://p99.gforge.inria.fr), write your own, or just use `pthreads`'? – Jason May 01 '14 at 15:36
  • Possible duplicate of [Does any C library implement C11 threads for GNU/Linux?](https://stackoverflow.com/questions/24557728/does-any-c-library-implement-c11-threads-for-gnu-linux) – Jason Sep 17 '19 at 16:33

0 Answers0