linuxkpi: Add trylock_page and unlock_page

Simple wrapper around vm_page_trylock and vm_page_unlock.

Reviewed by:	hselasky
Sponsored by:	Beckhoff Automation GmbH & Co. KG
Differential Revision:	https://reviews.freebsd.org/D36019
This commit is contained in:
Emmanuel Vadot 2022-08-02 09:33:47 +02:00
parent 7d2702a198
commit d1c3cfd79d

View File

@ -288,6 +288,19 @@ vmalloc_to_page(const void *addr)
return (PHYS_TO_VM_PAGE(paddr));
}
static inline int
trylock_page(struct page *page)
{
return (vm_page_trylock(page));
}
static inline void
unlock_page(struct page *page)
{
vm_page_unlock(page);
}
extern int is_vmalloc_addr(const void *addr);
void si_meminfo(struct sysinfo *si);