summaryrefslogtreecommitdiff
path: root/sys/uvm/uvm_map_i.h
diff options
context:
space:
mode:
authorArtur Grabowski <art@cvs.openbsd.org>2001-08-11 10:57:23 +0000
committerArtur Grabowski <art@cvs.openbsd.org>2001-08-11 10:57:23 +0000
commit7a180b0dffd8a6191dc39c284c4b43646bbe8ac6 (patch)
tree5442aa1b4d2ff26b5330a6478a7d647080cc100a /sys/uvm/uvm_map_i.h
parent511fb2556ded7a7b5ce46090532eccce46d77468 (diff)
Various random fixes from NetBSD.
Including support for zeroing pages in the idle loop (not enabled yet).
Diffstat (limited to 'sys/uvm/uvm_map_i.h')
-rw-r--r--sys/uvm/uvm_map_i.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/uvm/uvm_map_i.h b/sys/uvm/uvm_map_i.h
index 39262affb39..cac5159678e 100644
--- a/sys/uvm/uvm_map_i.h
+++ b/sys/uvm/uvm_map_i.h
@@ -1,5 +1,5 @@
-/* $OpenBSD: uvm_map_i.h,v 1.7 2001/05/10 07:59:06 art Exp $ */
-/* $NetBSD: uvm_map_i.h,v 1.16 1999/07/01 20:07:05 thorpej Exp $ */
+/* $OpenBSD: uvm_map_i.h,v 1.8 2001/08/11 10:57:22 art Exp $ */
+/* $NetBSD: uvm_map_i.h,v 1.17 2000/05/08 22:59:35 thorpej Exp $ */
/*
* Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -132,8 +132,12 @@ uvm_map_setup(map, min, max, flags)
/*
* If the map is interrupt safe, place it on the list
* of interrupt safe maps, for uvm_fault().
+ *
+ * We almost never set up an interrupt-safe map, but we set
+ * up quite a few regular ones (at every fork!), so put
+ * interrupt-safe map setup in the slow path.
*/
- if (flags & VM_MAP_INTRSAFE) {
+ if (__predict_false(flags & VM_MAP_INTRSAFE)) {
struct vm_map_intrsafe *vmi = (struct vm_map_intrsafe *)map;
int s;
@@ -192,7 +196,7 @@ MAP_INLINE void
uvm_map_reference(map)
vm_map_t map;
{
- if (map == NULL) {
+ if (__predict_false(map == NULL)) {
#ifdef DIAGNOSTIC
printf("uvm_map_reference: reference to NULL map\n");
#ifdef DDB
@@ -220,7 +224,7 @@ uvm_map_deallocate(map)
{
int c;
- if (map == NULL) {
+ if (__predict_false(map == NULL)) {
#ifdef DIAGNOSTIC
printf("uvm_map_deallocate: reference to NULL map\n");
#ifdef DDB