diff options
author | peter <peter@FreeBSD.org> | 2003-07-22 06:55:48 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2003-07-22 06:55:48 +0000 |
commit | 27c163f9f7cccc6f021745cafe4b2098452de387 (patch) | |
tree | a66504ae80871ac869c15cc70fb8f96ff76807b3 | |
parent | d7566f1c0d0a3e620a90adeb7023959bf3b8324c (diff) | |
download | FreeBSD-src-27c163f9f7cccc6f021745cafe4b2098452de387.zip FreeBSD-src-27c163f9f7cccc6f021745cafe4b2098452de387.tar.gz |
swp_pager_hash() was called before it was instantiated inline. This made
gcc (quite rightly) unhappy. Move it earlier.
-rw-r--r-- | sys/vm/swap_pager.c | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/sys/vm/swap_pager.c b/sys/vm/swap_pager.c index fc22f33..d175384 100644 --- a/sys/vm/swap_pager.c +++ b/sys/vm/swap_pager.c @@ -290,6 +290,35 @@ swp_sizecheck() } /* + * 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 @@ -1861,35 +1890,6 @@ restart: */ /* - * 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 * * We first convert the object to a swap object if it is a default |