Commit 013057a1 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

[t:5132] cast pthread_t through uintptr_t in order to print it in a way that's...

[t:5132] cast pthread_t through uintptr_t in order to print it in a way that's portable between linux and osx.  closes #5132

git-svn-id: file:///svn/toku/tokudb@44882 c7de825b-a66e-492c-adef-691d508d4ae1
parent f7c53f79
...@@ -533,7 +533,9 @@ static void *worker(void *arg_v) { ...@@ -533,7 +533,9 @@ static void *worker(void *arg_v) {
DB_ENV *env = arg->env; DB_ENV *env = arg->env;
DB_TXN *txn = NULL; DB_TXN *txn = NULL;
if (verbose) { if (verbose) {
printf("%lu starting %p\n", (unsigned long) toku_pthread_self(), arg->operation); toku_pthread_t self = toku_pthread_self();
uintptr_t intself = (uintptr_t) self;
printf("%lu starting %p\n", (unsigned long) intself, arg->operation);
} }
if (arg->cli->single_txn) { if (arg->cli->single_txn) {
r = env->txn_begin(env, 0, &txn, arg->txn_type); CKERR(r); r = env->txn_begin(env, 0, &txn, arg->txn_type); CKERR(r);
...@@ -576,7 +578,9 @@ static void *worker(void *arg_v) { ...@@ -576,7 +578,9 @@ static void *worker(void *arg_v) {
{ int chk_r = txn->commit(txn, 0); CKERR(chk_r); } { int chk_r = txn->commit(txn, 0); CKERR(chk_r); }
} }
if (verbose) { if (verbose) {
printf("%lu returning\n", (unsigned long) toku_pthread_self()); toku_pthread_t self = toku_pthread_self();
uintptr_t intself = (uintptr_t) self;
printf("%lu returning\n", (unsigned long) intself);
} }
toku_free(random_buf); toku_free(random_buf);
return arg; return arg;
......
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