swp_pager_hash() was called before it was instantiated inline. This made

gcc (quite rightly) unhappy.  Move it earlier.
This commit is contained in:
peter 2003-07-22 06:55:48 +00:00
parent fbc3c9cdd7
commit 0b811f5d4c

View File

@ -289,6 +289,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!
*
@ -1860,35 +1889,6 @@ swap_pager_swapoff(int devidx, int *sw_used)
* 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
*