pthread.h is POSIX compliant, threads.h isn't.
pthread.h
threads.h
But sure you can use it, it's implemented in linux and freeBSD kernels.
But threads.h is C11 compliant so by now ALL compilers have support for C11 at least for the three major ones:
MSVC GCC CLANG
Yup, seems nice, their is just a lack of documentation, I wanted to know what did it really does.
You can find documentation here: en.cppreference.com/w/c/thread
Well, it's the C libraries for two of those platforms that are supposed to implement threads.h (even though I'm pretty sure glibc doesn't), although I'm not sure what Windows does.
It's not the kernels, it's the C libraries. You can have a kernel installed and not be able to do anything without a C library.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
pthread.h
is POSIX compliant,threads.h
isn't.But sure you can use it, it's implemented in linux and freeBSD kernels.
But
threads.h
is C11 compliant so by now ALL compilers have support for C11 at least for the three major ones:MSVC
GCC
CLANG
Yup, seems nice, their is just a lack of documentation, I wanted to know what did it really does.
You can find documentation here: en.cppreference.com/w/c/thread
Well, it's the C libraries for two of those platforms that are supposed to implement
threads.h
(even though I'm pretty sure glibc doesn't), although I'm not sure what Windows does.It's not the kernels, it's the C libraries. You can have a kernel installed and not be able to do anything without a C library.