vm: fix a null dereference on out-of-memory
[minix.git] / servers / vm / arch / arm / pagefaults.h
blob757cb7fb615230a37f70eb398a24a14188b4b773
2 #ifndef _PAGEFAULTS_H
3 #define _PAGEFAULTS_H 1
5 #include <machine/vm.h>
7 #define PFERR_PROT(e) ((ARM_VM_PFE_FS(e) == ARM_VM_PFE_L1PERM) \
8 || (ARM_VM_PFE_FS(e) == ARM_VM_PFE_L2PERM))
9 #define PFERR_NOPAGE(e) (!PFERR_PROT(e))
10 #define PFERR_WRITE(e) ((e) & ARM_VM_PFE_W)
11 #define PFERR_READ(e) (!((e) & ARM_VM_PFE_W))
13 #endif