> No, the race condition is in your stack size test (which is written incorrectly), not in the stack creation.
You are right, the test should use pthread_getattr_np instead of pthread_attr_init.
> No, the race condition is in your stack size test (which is written incorrectly), not in the stack creation.
You are right, the test should use pthread_getattr_np instead of pthread_attr_init.