1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-15 10:17:20 +00:00

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 Wemm 2003-07-22 06:55:48 +00:00
parent 5b9f8ddbbd
commit da5fd14534
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=117866

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
*