From: VMware, Inc <> Date: Wed, 21 Dec 2011 23:59:55 +0000 (-0800) Subject: lib/lock: another missing piece is restored X-Git-Tag: 2011.12.20-562307~65 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ab853c29401bd69246fcf84b4d0c0d582f2ec3ec;p=thirdparty%2Fopen-vm-tools.git lib/lock: another missing piece is restored This one disappeared too. Put it back. Signed-off-by: Marcelo Vanzin --- diff --git a/open-vm-tools/lib/lock/ulInt.h b/open-vm-tools/lib/lock/ulInt.h index 30f6e1d1d..82f9fe586 100644 --- a/open-vm-tools/lib/lock/ulInt.h +++ b/open-vm-tools/lib/lock/ulInt.h @@ -394,7 +394,22 @@ MXRecLockRelease(MXRecLock *lock) // IN/OUT: static INLINE void * MXUserGetThreadID(void) { +#if defined(_WIN32) + /* + * On Windows there is a problem with using VThread_CurID() - it doesn't + * maintain unique thread ID values (PR 780775). Native thread ID values + * and special handling are used to resolve issues. + */ + + return (void *) (uintptr_t) GetCurrentThreadId(); // DWORD +#else + /* + * Outside of Windows there are no known issues with using VThread_CurID + * so that is what is used. + */ + return (void *) (uintptr_t) VThread_CurID(); // unsigned +#endif } /*