From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:47 +0000 (-0700) Subject: VThreadID: widen to uint64 X-Git-Tag: stable-10.2.0~138 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d3491185377ec39e8031b1ffb806fe781f329c1f;p=thirdparty%2Fopen-vm-tools.git VThreadID: widen to uint64 Convert VThreadID to uint64. --- diff --git a/open-vm-tools/lib/include/vthreadBase.h b/open-vm-tools/lib/include/vthreadBase.h index bc9c5b9e9..5b1e6f423 100644 --- a/open-vm-tools/lib/include/vthreadBase.h +++ b/open-vm-tools/lib/include/vthreadBase.h @@ -83,7 +83,7 @@ extern "C" { * Types */ -typedef unsigned VThreadID; +typedef uint64 VThreadID; #define VTHREAD_INVALID_ID (VThreadID)(0) diff --git a/open-vm-tools/lib/misc/vthreadBase.c b/open-vm-tools/lib/misc/vthreadBase.c index 302229fdd..30e6080ce 100644 --- a/open-vm-tools/lib/misc/vthreadBase.c +++ b/open-vm-tools/lib/misc/vthreadBase.c @@ -862,7 +862,7 @@ VThreadBase_InitWithTLS(VThreadBaseData *base) // IN: caller-managed storage * means the cooking function is broken - it should block signals - or * an ASSERT triggered while setting up the VThreadID. */ - Log("VThreadBase reinitialization, old: %d, new: %d.\n", + Log("VThreadBase reinitialization, old: %" FMT64 "d, new: %" FMT64 "d.\n", realBase->id, base->id); } @@ -928,7 +928,7 @@ VThreadBaseSafeDeleteTLS(void *tlsData) VERIFY(success); if (vmx86_debug) { - Log("Forgetting VThreadID %d (\"%s\").\n", + Log("Forgetting VThreadID %" FMT64 "d (\"%s\").\n", data->id, VThread_CurName()); } (*vthreadBaseGlobals.freeIDFunc)(data); @@ -1209,14 +1209,14 @@ VThreadBaseSimpleNoID(void) /* ID picked. Now do the important stuff. */ base = Util_SafeCalloc(1, sizeof *base); base->id = newID; - Str_Sprintf(newName, sizeof newName, "vthread-%u", newID); + Str_Sprintf(newName, sizeof newName, "vthread-%" FMT64 "u", newID); result = VThreadBase_InitWithTLS(base); VThreadBase_SetName(newName); ASSERT(result); if (vmx86_debug && reused) { - Log("VThreadBase reused VThreadID %d.\n", newID); + Log("VThreadBase reused VThreadID %" FMT64 "u.\n", newID); } }