summaryrefslogtreecommitdiff
path: root/pthread_win32_attach_detach_np.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread_win32_attach_detach_np.c')
-rw-r--r--pthread_win32_attach_detach_np.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/pthread_win32_attach_detach_np.c b/pthread_win32_attach_detach_np.c
index c798d89..3a6f854 100644
--- a/pthread_win32_attach_detach_np.c
+++ b/pthread_win32_attach_detach_np.c
@@ -144,6 +144,10 @@ pthread_win32_thread_detach_np ()
{
if (ptw32_processInitialized)
{
+ /*
+ * Don't use pthread_self() to avoid creating an implicit POSIX thread handle
+ * unnecessarily.
+ */
pthread_t self = (pthread_t) pthread_getspecific (ptw32_selfThreadKey);
/*