about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/thread/pthread_attr_init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/thread/pthread_attr_init.c b/src/thread/pthread_attr_init.c
index a962b460..398990d1 100644
--- a/src/thread/pthread_attr_init.c
+++ b/src/thread/pthread_attr_init.c
@@ -6,7 +6,9 @@ extern size_t __default_guardsize;
 int pthread_attr_init(pthread_attr_t *a)
 {
 	*a = (pthread_attr_t){0};
+	__acquire_ptc();
 	a->_a_stacksize = __default_stacksize;
 	a->_a_guardsize = __default_guardsize;
+	__release_ptc();
 	return 0;
 }