Thanks to visit codestin.com
Credit goes to github.com

Skip to content

compiler warning related to thread id debug logging #85

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ThomasWaldmann opened this issue May 14, 2023 · 0 comments
Open

compiler warning related to thread id debug logging #85

ThomasWaldmann opened this issue May 14, 2023 · 0 comments
Milestone

Comments

@ThomasWaldmann
Copy link
Collaborator

ThomasWaldmann commented May 14, 2023

From @mgorny in https://github.com/python-llfuse/python-llfuse/pull/80/files/102d4756b856646f1fc940170f2b69f03812c0f3#diff-440f3a2515847d1da342d710f9f5d91764986974db11f639a80039ed608e3845 :

I'm afraid this is a non-trivial problem. Roughly, you could:

  1. "dump" pthread_t but it's probably not worth the complexity for a debug print (basically print it as hex byte-by-byte)
  2. use non-portable getter inside the thread to get its numeric TID and pass it but it's complex and then you'd need extra compatibility if different platforms are involved, see e.g. https://github.com/llvm/llvm-project/blob/llvmorg-16.0.3/llvm/lib/Support/Unix/Threading.inc#L113-L134
  3. just create your own thread numbers and assign them consecutively (e.g. thread 1, thread 2 and so on)

See e.g. https://stackoverflow.com/questions/1759794/how-to-print-pthread-t

@ThomasWaldmann ThomasWaldmann added this to the 1.5.0 milestone May 20, 2023
@ThomasWaldmann ThomasWaldmann modified the milestones: 1.5.0, 1.5.1 Aug 6, 2023
@ThomasWaldmann ThomasWaldmann modified the milestones: 1.5.1, 1.6.0 Aug 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant