ref: 59f476969f5aa6954ebfeb121d1858e844b7b5ad
parent: de18a5f5d2f4f03b78663d203f72e6099ea59d0e
author: Sigrid Haflínudóttir <[email protected]>
date: Mon Sep 7 11:16:28 EDT 2020
threads: set stack size to whatever is in attributes
--- a/src/plan9_thread.c
+++ b/src/plan9_thread.c
@@ -24,13 +24,10 @@
int
pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*func)(void*), void *arg)
{
- uint stack;
-
- stack = attr->stack_size > mainstacksize ? attr->stack_size : mainstacksize;
thread->waitchan = chancreate(sizeof(void*), 0);
thread->func = func;
thread->arg = arg;
- thread->pid = proccreate(thre, thread, stack);
+ thread->pid = proccreate(thre, thread, attr->stack_size);
return 0;
}