mirror of
https://github.com/opnsense/src.git
synced 2026-04-27 09:06:49 -04:00
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:
parent
7d2702a198
commit
d1c3cfd79d
1 changed files with 13 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue