Generic cast to %p

cast to pointer from integer of different size seen on smartos
parent 2623159e
......@@ -7012,6 +7012,8 @@ t_lcb(struct fellow_cache *fc)
DBG("done %s","---");
}
// generic cast to %p
#define PP(x) (void *)(uintptr_t)(x)
// test concurrent iter while filling object
static void
t_busyobj(unsigned chksum, struct fellow_cache *fc)
......@@ -7048,7 +7050,7 @@ t_busyobj(unsigned chksum, struct fellow_cache *fc)
AZ(pthread_create(&iter_thr->thr, NULL,
test_fellow_cache_obj_iter_thread_f, iter_thr));
DBG("concurrent test_iter thread %p", (void *)iter_thr->thr);
DBG("concurrent test_iter thread %p", PP(iter_thr->thr));
u = fco->fcsl->fdsl->lsegs + 72 * 2;
XXX_LIMIT_LDSEGS = 1;
......@@ -7087,7 +7089,7 @@ t_busyobj(unsigned chksum, struct fellow_cache *fc)
priv2 = fco->fdb.fdb;
// check thread status
DBG("concurrent test_iter thread join %p", (void *)iter_thr->thr);
DBG("concurrent test_iter thread join %p", PP(iter_thr->thr));
AZ(pthread_join(iter_thr->thr, NULL));
VSHA256_Final(h2, &thr_sha256);
AZ(memcmp(h1, h2, sizeof *h1));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment