From: VMware, Inc <> Date: Wed, 26 Dec 2012 21:24:51 +0000 (-0800) Subject: Changes in shared code that don't affect open-vm-tools functionality. X-Git-Tag: 2012.12.26-958366~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db3f74e1b07dea7cb821b684fb072f8e7c3a8787;p=thirdparty%2Fopen-vm-tools.git Changes in shared code that don't affect open-vm-tools functionality. Signed-off-by: Dmitry Torokhov --- diff --git a/open-vm-tools/lib/include/util.h b/open-vm-tools/lib/include/util.h index 7460b2abd..a9539c276 100644 --- a/open-vm-tools/lib/include/util.h +++ b/open-vm-tools/lib/include/util.h @@ -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); diff --git a/open-vm-tools/lib/include/util_shared.h b/open-vm-tools/lib/include/util_shared.h index ded2262e0..e669683d0 100644 --- a/open-vm-tools/lib/include/util_shared.h +++ b/open-vm-tools/lib/include/util_shared.h @@ -80,8 +80,6 @@ Util_Throttle(uint32 count) // IN: *---------------------------------------------------------------------- */ -#define UTIL_FASTRAND_SEED_MAX (0x7fffffff) - uint32 Util_FastRand(uint32 seed) { diff --git a/open-vm-tools/lib/include/vm_basic_types.h b/open-vm-tools/lib/include/vm_basic_types.h index 24e29191e..53b681d67 100644 --- a/open-vm-tools/lib/include/vm_basic_types.h +++ b/open-vm-tools/lib/include/vm_basic_types.h @@ -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.