mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:48:11 +00:00
Kernel: {Mutex,Spinlock}::own_lock() => is_locked_by_current_thread()
Rename these API's to make it more clear what they are checking.
This commit is contained in:
parent
d9da513959
commit
0b4671add7
13 changed files with 52 additions and 52 deletions
|
@ -174,7 +174,7 @@ void Region::set_should_cow(size_t page_index, bool cow)
|
|||
|
||||
bool Region::map_individual_page_impl(size_t page_index)
|
||||
{
|
||||
VERIFY(m_page_directory->get_lock().own_lock());
|
||||
VERIFY(m_page_directory->get_lock().is_locked_by_current_thread());
|
||||
auto page_vaddr = vaddr_from_page_index(page_index);
|
||||
|
||||
bool user_allowed = page_vaddr.get() >= 0x00800000 && is_user_address(page_vaddr);
|
||||
|
@ -253,7 +253,7 @@ void Region::unmap(ShouldDeallocateVirtualRange deallocate_range)
|
|||
void Region::set_page_directory(PageDirectory& page_directory)
|
||||
{
|
||||
VERIFY(!m_page_directory || m_page_directory == &page_directory);
|
||||
VERIFY(s_mm_lock.own_lock());
|
||||
VERIFY(s_mm_lock.is_locked_by_current_thread());
|
||||
m_page_directory = page_directory;
|
||||
}
|
||||
|
||||
|
@ -394,8 +394,8 @@ PageFaultResponse Region::handle_inode_fault(size_t page_index_in_region)
|
|||
{
|
||||
VERIFY_INTERRUPTS_DISABLED();
|
||||
VERIFY(vmobject().is_inode());
|
||||
VERIFY(!s_mm_lock.own_lock());
|
||||
VERIFY(!g_scheduler_lock.own_lock());
|
||||
VERIFY(!s_mm_lock.is_locked_by_current_thread());
|
||||
VERIFY(!g_scheduler_lock.is_locked_by_current_thread());
|
||||
|
||||
auto& inode_vmobject = static_cast<InodeVMObject&>(vmobject());
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue