Page 1 of 1

threads.h included in GCC?

Posted: Sun Feb 26, 2023 9:16 pm
by FunnyGuy9796
I was wondering if the file threads.h was included in the GCC compiler because I had seen mixed answers online.

Re: threads.h included in GCC?

Posted: Sun Feb 26, 2023 10:08 pm
by klange
The compiler-provided headers that come with gcc can be found in the "ginclude" directory: https://github.com/gcc-mirror/gcc/tree/ ... c/ginclude

"threads.h" is not among them.

Re: threads.h included in GCC?

Posted: Wed Mar 01, 2023 4:20 am
by Cyao
klange wrote:The compiler-provided headers that come with gcc can be found in the "ginclude" directory: https://github.com/gcc-mirror/gcc/tree/ ... c/ginclude
Well that directory doesn't include all headers from gcc, the best way to see headers your gcc provides, is to at your gcc toolchain's include folder (for me it's /usr/local/Cellar/x86_64-elf-gcc/12.2.0/lib/gcc/x86_64-elf/12.2.0/include). There is a bunch of other headers (avx512...). But still, "threads.h" is not there