summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Morton <akpm@zip.com.au>2002-07-04 08:32:11 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2002-07-04 08:32:11 -0700
commitf1dfe022bbea7aa89e5215a984337d6559b6bcd2 (patch)
treef812df2e52fa0de4c33529bec88818d661192893 /include
parent5feb041e29d4f3a4b94c68ab9ada8f21caebbf48 (diff)
[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.
Diffstat (limited to 'include')
-rw-r--r--include/linux/mm.h10
1 files changed, 10 insertions, 0 deletions
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;