]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes in shared code that don't affect open-vm-tools functionality.
authorVMware, Inc <>
Wed, 26 Dec 2012 21:24:51 +0000 (13:24 -0800)
committerDmitry Torokhov <dtor@vmware.com>
Thu, 27 Dec 2012 19:47:00 +0000 (11:47 -0800)
Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/lib/include/util.h
open-vm-tools/lib/include/util_shared.h
open-vm-tools/lib/include/vm_basic_types.h

index 7460b2abd09ff2d6ea4d228211ff7157bd93d48e..a9539c2766898ef6f42966ff228d09848220061e 100644 (file)
@@ -152,6 +152,7 @@ Bool Util_QueryCStResidency(uint32 *numCpus, uint32 *numCStates,
 /*
  * In util_shared.h
  */
+#define UTIL_FASTRAND_SEED_MAX (0x7fffffff)
 Bool Util_Throttle(uint32 count);
 uint32 Util_FastRand(uint32 seed);
 
index ded2262e025bdc99683a4162af6e49c5a7932f6a..e669683d027d8b4d21f5cc7c8c747f8601c5094c 100644 (file)
@@ -80,8 +80,6 @@ Util_Throttle(uint32 count)  // IN:
  *----------------------------------------------------------------------
  */
 
-#define UTIL_FASTRAND_SEED_MAX (0x7fffffff)
-
 uint32
 Util_FastRand(uint32 seed)
 {
index 24e29191e5514ead7318530290725b4a0e1351d9..53b681d6743e1f8f1ba3b0bd9fc9b1fd6ee87587 100644 (file)
@@ -1,5 +1,5 @@
 /*********************************************************
- * Copyright (C) 1998-2009 VMware, Inc. All rights reserved.
+ * Copyright (C) 1998-2012 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
@@ -707,6 +707,19 @@ typedef void * UserVA;
 #define SIDE_EFFECT_FREE
 #endif
 
+/*
+ * Used when a function exmaines no input other than its arguments and
+ * has no side effects other than its return value.  Stronger than
+ * SIDE_EFFECT_FREE as the function is not allowed to read from global
+ * memory.
+ */
+
+#if defined(__GNUC__) && (defined(VMM) || defined (VMKERNEL))
+#define CONST_FUNCTION __attribute__((__const__))
+#else
+#define CONST_FUNCTION
+#endif
+
 /*
  * Attributes placed on function declarations to tell the compiler
  * that the function never returns.