From: Michael Bieber <onsager@gmx.net>
To: pthreads-win32@sourceware.org
Subject: Accessing Windows thread id
Date: Sat, 26 May 2007 14:21:00 -0000 [thread overview]
Message-ID: <1522450048.20070526151035@gmx.net> (raw)
@list
I would like exploit the technique, described here:
http://msdn2.microsoft.com/en-us/library/xcb2z8hs(vs.80).aspx
in order to help my Visual Studio debugger with some more expressive
thread names.
Unfortunately, this is relying on a thread id not being public
accessible for pthreads_win32 clients (It is the last argument to
_beginthreadex, after that call hidden inside the non-public
ptw32_thread_t structure). Windows GetThreadId is no help here, because
it isn't defined for Win XP. Even GetCurrentId is not entirely what I
would like, because the call to SetThreadName (cf. URL above) doesn't
come from the calling thread in my case.
So, is there a way to get the Windows thread id in a way similar to
pthread_getw32threadhandle_np for a handle?
Micha
--
next reply other threads:[~2007-05-26 13:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-26 14:21 Michael Bieber [this message]
2007-05-27 7:30 ` Ross Johnson
2007-05-27 9:07 ` Michael Bieber
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1522450048.20070526151035@gmx.net \
--to=onsager@gmx.net \
--cc=pthreads-win32@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).