summaryrefslogtreecommitdiff
path: root/Kernel/Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/Thread.cpp')
-rw-r--r--Kernel/Thread.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp
index 7bef932346..b2b86979fe 100644
--- a/Kernel/Thread.cpp
+++ b/Kernel/Thread.cpp
@@ -1059,10 +1059,10 @@ KResult Thread::make_thread_specific_region(Badge<Process>)
return KSuccess;
auto range = process().allocate_range({}, thread_specific_region_size());
- if (!range.is_valid())
+ if (!range.has_value())
return ENOMEM;
- auto region_or_error = process().allocate_region(range, "Thread-specific", PROT_READ | PROT_WRITE);
+ auto region_or_error = process().allocate_region(range.value(), "Thread-specific", PROT_READ | PROT_WRITE);
if (region_or_error.is_error())
return region_or_error.error();