1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:28:12 +00:00

AK+Kernel: Remove implicit conversion from Userspace<T*> to FlatPtr

This feels like it was a refactor transition kind of conversion. The
places that were relying on it can easily be changed to explicitly ask
for the ptr() or a new vaddr() method on Userspace<T*>.

FlatPtr can still implicitly convert to Userspace<T> because the
constructor is not explicit, but there's quite a few more places that
are relying on that conversion.
This commit is contained in:
Andrew Kaster 2021-11-14 15:52:48 -07:00 committed by Andreas Kling
parent 7243bcb7da
commit f1d8978804
5 changed files with 14 additions and 11 deletions

View file

@ -87,7 +87,7 @@ void Process::sys$exit_thread(Userspace<void*> exit_value, Userspace<void*> stac
PerformanceManager::add_thread_exit_event(*current_thread);
if (stack_location) {
auto unmap_result = address_space().unmap_mmap_range(VirtualAddress { stack_location }, stack_size);
auto unmap_result = address_space().unmap_mmap_range(stack_location.vaddr(), stack_size);
if (unmap_result.is_error())
dbgln("Failed to unmap thread stack, terminating thread anyway. Error code: {}", unmap_result.error());
}