0

I'm porting one Linux application to Windows using Visual Studio 2015. I know there is pthread for Windows project out there but I want to convert all pthread calls to c11 standard thread libraries. However, I found the document extremely difficult to find. To be specific, I'm trying to find the equivalent of pthread_attr_t in C11 thread but could not find any.

Can somebody point out reference materials? Thanks!

Archer
  • 507
  • 1
  • 8
  • 21
  • Visual Studio doesn't follow C11 (it barely follows any C standard). You'll need to use a standard compliant C compiler instead. – Lundin Oct 31 '16 at 11:40

1 Answers1

0

There is no equivalent to attributes for C11 thread creation. The only additional state that a thread can have is to be detached. This you achieve by calling thrd_detach.

Jens Gustedt
  • 76,821
  • 6
  • 102
  • 177
  • Then, is there any standard APIs for set stack size, or priority? – Archer Oct 31 '16 at 00:46
  • Thread priorities - http://stackoverflow.com/questions/18884510/portable-way-of-setting-stdthread-priority-in-c11 – cup Nov 16 '16 at 13:38