Questions tagged [threads.h]

C11 Threads support library

It refers to the header file to be included in C11 source files in order to use the power of the newly introduced Thread support library. Here you can find the reference (from cppreference.com) to the library.

5 questions
11
votes
5 answers

clang c11 threads.h not found

I am trying to setup a c11 thread example in xcode... but it doesn't seem to have the threads.h header, though it isn't complaning about the macro described here: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf __STDC_NO_THREADS__The…
Grady Player
  • 14,399
  • 2
  • 48
  • 76
1
vote
1 answer

How do I upgrade from POSIX to , C11 standard?

Switching my C program from pthreads, POSIX , to the C11 standard . Im on a MAC from 2019. Below is my error and my gcc -version output. How do I upgrade to use ? Question's from 7 years ago say that it is not…
seamus
  • 2,681
  • 7
  • 26
  • 49
0
votes
1 answer

GCC undefined reference to thrd_create() in C11 mode after #include in Debian

I'm trying to compile a program that I've been able to compile on several other Debian environments with no issues using the C11 library on a relatively fresh install of Debian Bullseye with "gcc (Debian 10.2.1-6) 10.2.1 20210110"…
Willis Hershey
  • 1,520
  • 4
  • 22
0
votes
1 answer

Sharing mutexes stored on the main thread's stack with a child thread

While experimenting with c11 threads.h and mutexes to synchronise a network thead and a main thread I started using following procedure: -define a mutex in the main function mtx_t mutex_network_acqbuffer; -initializing it…
Beny Benz
  • 13
  • 5
0
votes
1 answer

C11 threads.h library

What I am trying to do is to use threads.h from C11 standard on Windows 10. I had been installed Code::Blocks with MinGW. I've set in the Compiler Settings -std=c11 flag, but with no luck. I have been also installed a Win64 version of MinGW and I…
Mihai
  • 29
  • 1
  • 6