This didn't work on 32 bit platforms.
Details
Details
- Reviewers
protze.joachim pawosm01 - Commits
- rG45bdca2f0c40: Merging r322160: --------------------------------------------------------------…
rGf34d65a164ac: [OMPT] Fix cast and printf of wait_id in lock test
rL322640: Merging r322160:
rOMP322160: [OMPT] Fix cast and printf of wait_id in lock test
rL322160: [OMPT] Fix cast and printf of wait_id in lock test
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
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.