diff options
author | Konstantin Belousov <kib@FreeBSD.org> | 2012-11-14 20:01:40 +0000 |
---|---|---|
committer | Konstantin Belousov <kib@FreeBSD.org> | 2012-11-14 20:01:40 +0000 |
commit | b32ecf44bcee1c4daec4f51442fad76e5b0849ea (patch) | |
tree | fe0b937a1c55b958f76306b0964a8d88a0f20367 /sys/vm/vm_page.h | |
parent | 6feceb86abe5981b18b5f7cd21b7fcbd83a2e64d (diff) | |
download | src-b32ecf44bcee1c4daec4f51442fad76e5b0849ea.tar.gz src-b32ecf44bcee1c4daec4f51442fad76e5b0849ea.zip |
Notes
Diffstat (limited to 'sys/vm/vm_page.h')
-rw-r--r-- | sys/vm/vm_page.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/vm/vm_page.h b/sys/vm/vm_page.h index 76cee0322aef..d9e4692e6731 100644 --- a/sys/vm/vm_page.h +++ b/sys/vm/vm_page.h @@ -347,6 +347,22 @@ vm_page_t PHYS_TO_VM_PAGE(vm_paddr_t pa); #define VM_ALLOC_COUNT_SHIFT 16 #define VM_ALLOC_COUNT(count) ((count) << VM_ALLOC_COUNT_SHIFT) +#ifdef M_NOWAIT +static inline int +malloc2vm_flags(int malloc_flags) +{ + int pflags; + + pflags = (malloc_flags & M_USE_RESERVE) != 0 ? VM_ALLOC_INTERRUPT : + VM_ALLOC_SYSTEM; + if ((malloc_flags & M_ZERO) != 0) + pflags |= VM_ALLOC_ZERO; + if ((malloc_flags & M_NODUMP) != 0) + pflags |= VM_ALLOC_NODUMP; + return (pflags); +} +#endif + void vm_page_busy(vm_page_t m); void vm_page_flash(vm_page_t m); void vm_page_io_start(vm_page_t m); |