[Openmp-commits] [PATCH] D41853: [OMPT] Fix cast and printf of wait_id in lock test
Joachim Protze via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 9 09:30:19 PST 2018
protze.joachim accepted this revision.
protze.joachim added a comment.
This revision is now accepted and ready to land.
I would have expected, that
printf("%" PRIu64 ": &lock: %lu\n", ompt_get_thread_data()->value, (unsigned long) &lock);
would also fix the issue.
But `(uint64_t) &lock` actually extends the 32-bit address to 64-bit signed integer: fffef9c8 -> fffffffffffef9c8
This is the same value as provided by the callback function.
The spec only requires a unique identifier here, so this behavior is fine.
Repository:
rOMP OpenMP
https://reviews.llvm.org/D41853
More information about the Openmp-commits
mailing list