From: Oliver Kurth Date: Fri, 15 Sep 2017 18:23:41 +0000 (-0700) Subject: VThread_Init: remove VThreadID parameter X-Git-Tag: stable-10.2.0~194 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ce18b4a333b1d0e757ba3e9b3f650f5d860f35c9;p=thirdparty%2Fopen-vm-tools.git VThread_Init: remove VThreadID parameter With the removal of static VThreadIDs, there is no longer any need to specify a specific VThreadID when initializing the VThread library. We can simply auto-assign an ID instead. Remove the VThreadID parameter from all callsites. Remove all VTHREAD_xxx_ID macros (except VTHREAD_INVALID_ID). Slightly adjust vthreadBase.c to "know" that VThreadIDs now start at 1, not 5. --- diff --git a/open-vm-tools/lib/include/vthreadBase.h b/open-vm-tools/lib/include/vthreadBase.h index 9d444b97c..bc9c5b9e9 100644 --- a/open-vm-tools/lib/include/vthreadBase.h +++ b/open-vm-tools/lib/include/vthreadBase.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2006-2016 VMware, Inc. All rights reserved. + * Copyright (C) 2006-2017 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -126,12 +126,6 @@ VThread_CurName(void) #else -#define VTHREAD_VMX_ID 1 -//#define VTHREAD_SVGA_ID 2 /* To be removed shortly */ -//#define VTHREAD_MKS_ID 3 -#define VTHREAD_OTHER_ID 4 -#define VTHREAD_ALLOCSTART_ID 5 - #define VTHREADBASE_MAX_NAME 32 /* Arbitrary */ diff --git a/open-vm-tools/lib/misc/vthreadBase.c b/open-vm-tools/lib/misc/vthreadBase.c index ca8e69023..302229fdd 100644 --- a/open-vm-tools/lib/misc/vthreadBase.c +++ b/open-vm-tools/lib/misc/vthreadBase.c @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2010-2016 VMware, Inc. All rights reserved. + * Copyright (C) 2010-2017 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -46,8 +46,6 @@ * to clean up resource usage prior to thread * exit. * Historical quirks: - * * Default thread numbering starts at VTHREAD_MAX_VCPUs + 2 - * to allow VThread_IsVCPU() to run efficiently. * * Most other code uses VThread_Foo instead of VThreadBase_Foo; the * public header file uses inlines to convert names. * @@ -154,7 +152,7 @@ static struct { } vthreadBaseGlobals = { { VTHREADBASE_INVALID_KEY }, { VTHREADBASE_INVALID_KEY }, - { VTHREAD_ALLOCSTART_ID }, + { VTHREAD_INVALID_ID + 1 }, { 0 }, { 0 }, VThreadBaseSimpleNoID,