From 1d02940c83525b248eb1b04e0d2bd6354d5f53df Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Thu, 19 Apr 2012 18:43:16 -0400 Subject: [PATCH] ck_ht: Fix ck_ht_entry_key for some non-x86_64 platforms. Previously we would clear top 16 bits of pointer, fix this behavior to only apply this behavior on x86_64. --- include/ck_ht.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/ck_ht.h b/include/ck_ht.h index 8d933ab..1ce9376 100644 --- a/include/ck_ht.h +++ b/include/ck_ht.h @@ -122,7 +122,11 @@ CK_CC_INLINE static void * ck_ht_entry_key(ck_ht_entry_t *entry) { +#ifdef __x86_64__ return (void *)(entry->key & (((uintptr_t)1 << 48) - 1)); +#else + return (void *)entry->key; +#endif } CK_CC_INLINE static uint16_t