From f1dfe022bbea7aa89e5215a984337d6559b6bcd2 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 4 Jul 2002 08:32:11 -0700 Subject: [PATCH] Use names, not numbers for pagefault types This is Bill Irwin's cleanup patch which gives symbolic names to the fault types: #define VM_FAULT_OOM (-1) #define VM_FAULT_SIGBUS 0 #define VM_FAULT_MINOR 1 #define VM_FAULT_MAJOR 2 Only arch/i386 has been updated - other architectures can do this too. --- include/linux/mm.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/linux') diff --git a/include/linux/mm.h b/include/linux/mm.h index c93dfffc4760..163e19fd7b33 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -305,6 +305,16 @@ static inline void set_page_zone(struct page *page, unsigned long zone_num) #define NOPAGE_SIGBUS (NULL) #define NOPAGE_OOM ((struct page *) (-1)) +/* + * Different kinds of faults, as returned by handle_mm_fault(). + * Used to decide whether a process gets delivered SIGBUS or + * just gets major/minor fault counters bumped up. + */ +#define VM_FAULT_OOM (-1) +#define VM_FAULT_SIGBUS 0 +#define VM_FAULT_MINOR 1 +#define VM_FAULT_MAJOR 2 + /* The array of struct pages */ extern struct page *mem_map; -- cgit v1.2.3