Kernel/LibC: Implement pthread_attr_init

This commit is contained in:
2025-04-15 23:19:55 +03:00
parent 4bcd3ed86f
commit 08f5833ca8
2 changed files with 13 additions and 3 deletions

View File

@@ -2051,10 +2051,14 @@ namespace Kernel
BAN::ErrorOr<long> Process::sys_pthread_create(const pthread_attr_t* attr, void (*entry)(void*), void* arg)
{
if (attr != nullptr)
if (attr)
{
dwarnln("pthread attr not supported");
return BAN::Error::from_errno(ENOTSUP);
TRY(validate_pointer_access(attr, sizeof(*attr), false));
if (*attr)
{
dwarnln("pthread attr not supported");
return BAN::Error::from_errno(ENOTSUP);
}
}
LockGuard _(m_process_lock);