]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
VThread: change VTHREAD_INVALID_ID, move VTHREAD_MAX_THREADS
authorOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:25 +0000 (11:23 -0700)
committerOliver Kurth <okurth@vmware.com>
Fri, 15 Sep 2017 18:23:25 +0000 (11:23 -0700)
Two tiny but wide-ranging changes.
- Now that there are no remaining users of VTHREAD_MAX_THREADS outside
the lib/thread library itself, reduce the scope of that declaration
to vthreadInt.h.
- Change VTHREAD_INVALID_ID to a value of 0 instead of a value of ~0.
(And correspondingly, bump the ~4 hard-coded VThreadIDs that remain).
This reflects that the ID may now be default-initialized.

open-vm-tools/lib/include/vthreadBase.h

index eb261ebf248e8fc581482f448fc1c68676c09abd..4d02cc91d646a497f65f5e89bf33fa698ff88429 100644 (file)
@@ -85,10 +85,7 @@ extern "C" {
 
 typedef unsigned VThreadID;
 
-#define VTHREAD_INVALID_ID    (VThreadID)(~0u)
-
-/* XXX Vestigial need as an MXState array size */
-#define VTHREAD_MAX_THREADS   288
+#define VTHREAD_INVALID_ID    (VThreadID)(0)
 
 #ifdef VMM
 /*
@@ -129,11 +126,11 @@ VThread_CurName(void)
 
 #else
 
-#define VTHREAD_VMX_ID          0
-#define VTHREAD_SVGA_ID         1
-#define VTHREAD_MKS_ID          2
-#define VTHREAD_OTHER_ID        3
-#define VTHREAD_ALLOCSTART_ID   4
+#define VTHREAD_VMX_ID          1
+#define VTHREAD_SVGA_ID         2
+#define VTHREAD_MKS_ID          3
+#define VTHREAD_OTHER_ID        4
+#define VTHREAD_ALLOCSTART_ID   5
 
 #define VTHREADBASE_MAX_NAME    32  /* Arbitrary */