1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 05:17:34 +00:00

Kernel+LibPthread+LibC: Create secondary thread stacks in userspace

Have pthread_create() allocate a stack and passing it to the kernel
instead of this work happening in the kernel. The more of this we can
do in userspace, the better.

This patch also unexposes the raw create_thread() and exit_thread()
syscalls since they are now only used by LibPthread anyway.
This commit is contained in:
Andreas Kling 2019-11-17 17:28:17 +01:00
parent 6685be36a0
commit e34ed04d1e
7 changed files with 30 additions and 33 deletions

View file

@ -509,18 +509,6 @@ char* getlogin()
return nullptr;
}
int create_thread(void* (*entry)(void*), void* argument)
{
int rc = syscall(SC_create_thread, entry, argument);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
void exit_thread(void* code)
{
syscall(SC_exit_thread, code);
ASSERT_NOT_REACHED();
}
int ftruncate(int fd, off_t length)
{
int rc = syscall(SC_ftruncate, fd, length);