/* ********************************************************** * Copyright 2007 - 2009 VMware, Inc. All rights reserved. * **********************************************************/ /* * @VMKAPIMOD_LICENSE@ */ /* *********************************************************************** * Constants */ /** * \defgroup Constants Constants * * Useful constants * * @{ *********************************************************************** */ #ifndef _VMKAPI_CONST_H_ #define _VMKAPI_CONST_H_ /** \cond never */ #ifndef VMK_HEADER_INCLUDED_FROM_VMKAPI_H #error This vmkapi file should never be included directly but only via vmkapi.h #endif /** \endcond never */ #if !defined(NULL) # ifndef __cplusplus # define NULL (void *)0 # else # define NULL __null # endif #endif #if defined(VMX86_DEBUG) # define vmkApiDebug 1 #else # define vmkApiDebug 0 #endif /** * \brief Wrapper for 64 bit signed and unsigned constants */ #if defined(__ia64__) || defined(__x86_64__) #define VMK_CONST64(c) c##L #define VMK_CONST64U(c) c##UL #else #define VMK_CONST64(c) c##LL #define VMK_CONST64U(c) c##ULL #endif /** Max length of a device name such as 'scsi0' */ #define VMK_DEVICE_NAME_MAX_LENGTH 32 /** Printf format for a 64 bit wide value */ #if defined(__x86_64__) #define VMK_FMT64 "l" #else #define VMK_FMT64 "L" #endif #define VMK_KILOBYTE (1024) #define VMK_MEGABYTE (1024 * VMK_KILOBYTE) #define VMK_GIGABYTE (1024 * VMK_MEGABYTE) #define VMK_TERABYTE (VMK_CONST64U(1024) * VMK_GIGABYTE) #define VMK_PETABYTE (VMK_CONST64U(1024) * VMK_TERABYTE) #define VMK_EXABYTE (VMK_CONST64U(1024) * VMK_PETABYTE) #endif /* _VMKAPI_CONST_H_ */ /** @} */