Kernel/LibC: Allocate thread stacks in userspace
This adds support for pthread function for stack manipulation. Also keep track of main threads stack in the uthread
This commit is contained in:
@@ -16,6 +16,7 @@ typedef struct
|
||||
int schedpolicy;
|
||||
int detachstate;
|
||||
int scope;
|
||||
void* stackaddr;
|
||||
size_t stacksize;
|
||||
size_t guardsize;
|
||||
} pthread_attr_t;
|
||||
|
||||
@@ -49,6 +49,7 @@ struct uthread
|
||||
pid_t id;
|
||||
pthread_attr_t attr;
|
||||
int errno_;
|
||||
int libc_owns_stack;
|
||||
int cancel_type;
|
||||
int cancel_state;
|
||||
volatile int canceled;
|
||||
|
||||
Reference in New Issue
Block a user