Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jul 2003 20:38:23 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 34813 for review
Message-ID:  <200307220338.h6M3cNTm032915@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=34813

Change 34813 by peter@peter_hammer on 2003/07/21 20:37:57

	*kick* dillon. Define inlined functions before using them.

Affected files ...

.. //depot/projects/hammer/sys/vm/swap_pager.c#13 edit

Differences ...

==== //depot/projects/hammer/sys/vm/swap_pager.c#13 (text+ko) ====

@@ -290,6 +290,35 @@
 }
 
 /*
+ * SWP_PAGER_HASH() -	hash swap meta data
+ *
+ *	This is an inline helper function which hashes the swapblk given
+ *	the object and page index.  It returns a pointer to a pointer
+ *	to the object, or a pointer to a NULL pointer if it could not
+ *	find a swapblk.
+ *
+ *	This routine must be called at splvm().
+ */
+static __inline struct swblock **
+swp_pager_hash(vm_object_t object, vm_pindex_t index)
+{
+	struct swblock **pswap;
+	struct swblock *swap;
+
+	index &= ~(vm_pindex_t)SWAP_META_MASK;
+	pswap = &swhash[(index ^ (int)(intptr_t)object) & swhash_mask];
+	while ((swap = *pswap) != NULL) {
+		if (swap->swb_object == object &&
+		    swap->swb_index == index
+		) {
+			break;
+		}
+		pswap = &swap->swb_hnext;
+	}
+	return (pswap);
+}
+
+/*
  * SWAP_PAGER_INIT() -	initialize the swap pager!
  *
  *	Expected to be started from system init.  NOTE:  This code is run 
@@ -1860,34 +1889,6 @@
  *	appropriate tracking counters.
  */
 
-/*
- * SWP_PAGER_HASH() -	hash swap meta data
- *
- *	This is an inline helper function which hashes the swapblk given
- *	the object and page index.  It returns a pointer to a pointer
- *	to the object, or a pointer to a NULL pointer if it could not
- *	find a swapblk.
- *
- *	This routine must be called at splvm().
- */
-static __inline struct swblock **
-swp_pager_hash(vm_object_t object, vm_pindex_t index)
-{
-	struct swblock **pswap;
-	struct swblock *swap;
-
-	index &= ~(vm_pindex_t)SWAP_META_MASK;
-	pswap = &swhash[(index ^ (int)(intptr_t)object) & swhash_mask];
-	while ((swap = *pswap) != NULL) {
-		if (swap->swb_object == object &&
-		    swap->swb_index == index
-		) {
-			break;
-		}
-		pswap = &swap->swb_hnext;
-	}
-	return (pswap);
-}
 
 /*
  * SWP_PAGER_META_BUILD() -	add swap block to swap meta data for object



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200307220338.h6M3cNTm032915>