diff --git a/dix/resource_priv.h b/dix/resource_priv.h index c398ecdba..4e641e583 100644 --- a/dix/resource_priv.h +++ b/dix/resource_priv.h @@ -115,4 +115,18 @@ static inline Bool dixResouceIsServerOwned(XID xid) { return (dixClientForXID(xid) == serverClient); } +/* + * @brief hash a XID for using as hashtable index + * + * @param id the XID to hash + * @param numBits number of bits in the resulting hash (>=0) + * @result the computed hash value + * + * @note This function is really only for handling + * INITHASHSIZE..MAXHASHSIZE bit hashes, but will handle any number + * of bits by either masking numBits lower bits of the ID or by + * providing at most MAXHASHSIZE hashes. + */ +int HashResourceID(XID id, unsigned int numBits); + #endif /* _XSERVER_DIX_RESOURCE_PRIV_H */ diff --git a/include/resource.h b/include/resource.h index 3451eb5d2..4742f6add 100644 --- a/include/resource.h +++ b/include/resource.h @@ -259,16 +259,4 @@ extern _X_EXPORT unsigned int GetXIDList(ClientPtr /*client */ , extern _X_EXPORT RESTYPE lastResourceType; extern _X_EXPORT RESTYPE TypeMask; -/** @brief A hashing function to be used for hashing resource IDs - - @param id The resource ID to hash - @param numBits The number of bits in the resulting hash. Must be >=0. - - @note This function is really only for handling - INITHASHSIZE..MAXHASHSIZE bit hashes, but will handle any number - of bits by either masking numBits lower bits of the ID or by - providing at most MAXHASHSIZE hashes. -*/ -extern _X_EXPORT int HashResourceID(XID id, unsigned int numBits); - #endif /* RESOURCE_H */