ReactOS  r75919
compiler.h File Reference
#include <assert.h>
#include <ctype.h>
#include <math.h>
#include <limits.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <float.h>
#include <stdarg.h>
#include <stdint.h>
Include dependency graph for compiler.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define inline
 
#define INLINE   inline
 
#define PUBLIC
 
#define USED
 
#define CONST   const
 
#define __builtin_expect(x, y)   (x)
 
#define likely(x)   (x)
 
#define unlikely(x)   (x)
 
#define __FUNCTION__   "<unknown>"
 
#define CPU_TO_LE32(x)   ( x )
 
#define MESA_LITTLE_ENDIAN   1
 
#define LE32_TO_CPU(x)   CPU_TO_LE32( x )
 
#define _ASMAPI
 
#define _ASMAPIP   _ASMAPI *
 
#define _NORMAPI
 
#define _NORMAPIP   *
 
#define ASSERT(X)
 
#define STATIC_ASSERT(COND)
 
#define PRINTFLIKE(f, a)
 
#define NULL   0
 
#define LONGSTRING
 
#define M_PI   (3.14159265358979323846)
 
#define M_E   (2.7182818284590452354)
 
#define M_LOG2E   (1.4426950408889634074)
 
#define ONE_DIV_SQRT_LN2   (1.201122408786449815)
 
#define FLT_MAX_EXP   128
 
#define START_FAST_MATH(x)   x = 0
 
#define END_FAST_MATH(x)   (void)(x)
 
#define Elements(x)   (sizeof(x)/sizeof(*(x)))
 

Macro Definition Documentation

#define __builtin_expect (   x,
  y 
)    (x)

__builtin_expect macros

Definition at line 178 of file compiler.h.

Referenced by KiCommonExit(), KiEnterV86Trap(), KiExitV86Trap(), KiSystemServiceHandler(), KiTrap06Handler(), and KiTrap0DHandler().

#define __FUNCTION__   "<unknown>"

The FUNCTION gcc variable is generally only used for debugging. If we're not using gcc, define FUNCTION as a cpp symbol here. Don't define it if using a newer Windows compiler.

Definition at line 205 of file compiler.h.

Referenced by __journal_remove_journal_head(), __xprt_do_unregister(), _mesa_base_format_has_channel(), _mesa_unpack_uint_rgba_row(), _tnl_draw_prims(), AccessCheckByTypeAndAuditAlarmA(), AccessCheckByTypeAndAuditAlarmW(), AccessCheckByTypeResultListAndAuditAlarmA(), AccessCheckByTypeResultListAndAuditAlarmByHandleA(), AccessCheckByTypeResultListAndAuditAlarmByHandleW(), AccessCheckByTypeResultListAndAuditAlarmW(), AddUsersToEncryptedFile(), ADsDecodeBinaryData(), AdsFreeAdsValues(), AdsTypeToPropVariant(), AdsTypeToPropVariant2(), BasepAllocateActivationContextActivationBlock(), BaseSrvNlsLogon(), BaseSrvNlsUpdateRegistryCache(), BlMmUnmapVirtualAddressEx(), CmpDelayDerefKeyControlBlock(), CmpDereferenceKeyControlBlock(), CmpDereferenceKeyControlBlockWithLock(), CmpReferenceKeyControlBlock(), ConvertSecDescriptorToVariant(), ConvertSecurityDescriptorToSecDes(), CreatePrivateObjectSecurityEx(), CreatePrivateObjectSecurityWithMultipleInheritance(), CreateProcessNotifyRoutine(), CreateRemoteThread(), CreateThreadNotifyRoutine(), CSR_API(), CsrCreateRemoteThread(), CsrCreateThread(), CsrDebugProcess(), CsrDebugProcessStop(), CsrInitCsrRootProcess(), CsrpConnectToServer(), CsrServerInitialization(), DbgDrvMovePanning(), DbgDrvQuerySpoolType(), DdCreateSurface(), DecryptFileW(), DriverEntry(), EncryptFileW(), EncryptionDisable(), ext3_find_entry(), ext3_is_dir_empty(), ext4_init_block_bitmap(), ext4_init_inode_bitmap(), FileEncryptionStatusW(), free_variable(), FreeEncryptionCertificateHashList(), GetAuditedPermissionsFromAclW(), getnetconfig(), GetSecurityInfoExA(), GetSecurityInfoExW(), HvAllocateCell(), HvFreeCell(), HvMarkCellDirty(), HvpGetCellHeader(), HvReallocateCell(), insert_revoke_hash(), IoAcquireRemoveLockEx(), IoAllocateIrp(), IoBuildAsynchronousFsdRequest(), IoBuildDeviceIoControlRequest(), IoCancelIrp(), IoCancelThreadIo(), IofCompleteRequest(), IoFreeIrp(), IoInitializeIrp(), IoInitializeRemoveLockEx(), IoMakeAssociatedIrp(), IopCleanupIrp(), IopCompleteRequest(), IopDisassociateThreadIrp(), IoQueueThreadIrp(), IoRegisterPlugPlayNotification(), IoReleaseRemoveLockAndWaitEx(), IoReleaseRemoveLockEx(), IoReuseIrp(), IoUnregisterPlugPlayNotification(), IsaAddDevice(), IsaCreateClose(), IsaIoctl(), IsaPnp(), IsaReadWrite(), journal_alloc_journal_head(), journal_bmap(), journal_init_inode(), KeRestoreFloatingPointState(), KeSaveFloatingPointState(), KeWaitForMultipleObjects(), LdrFindEntryForAddress(), LdrLoadDll(), LdrpLoadDll(), LdrpLoadImportModule(), LdrpMapDll(), LdrpResolveFullName(), LdrpSearchPath(), light_fast_rgba(), light_fast_rgba_single(), light_rgba(), light_rgba_spec(), LoadImageNotifyRoutine(), MiResolveImageReferences(), MmIsNonPagedSystemAddressValid(), MmPapAllocatePagesInRange(), MmUnmapVirtualAddress(), MsafdReturnWithErrno(), NtDuplicateObject(), NtGdiCloseFigure(), NtGdiFlattenPath(), NtGdiPathToRegion(), NtGdiStrokeAndFillPath(), NtGdiStrokePath(), NtProcessStartup(), ObDuplicateObject(), ObInsertObject(), ObOpenObjectByName(), ObOpenObjectByPointer(), ObpCloseHandle(), ObpCloseHandleTableEntry(), ObpCreateHandle(), ObpCreateUnnamedHandle(), ObpDecrementHandleCount(), ObpIncrementHandleCount(), ObpIncrementUnnamedHandleCount(), ObpLookupObjectName(), parse_ncp(), PATH_StrokePath(), PropVariantToAdsType(), PropVariantToAdsType2(), QueryActCtxW(), QueryRecoveryAgentsOnEncryptedFile(), QueryUsersOnEncryptedFile(), QueueUserAPC(), RemoveUsersFromEncryptedFile(), RfsdInitializeVcb(), RfsdReadFile(), RtlDosSearchPath_U(), RtlDosSearchPath_Ustr(), RtlGetFullPathName_UstrEx(), RtlpValidateActCtx(), SearchPathW(), SmCompleteSession(), SmConnectApiPort(), SmExecuteProgram(), SmLookupSubsystem(), SmpCreateForeignSession(), SmpLoadDeferedSubsystem(), SmpSessionComplete(), SmpStartCsr(), SmpStopCsr(), SmpTerminateForeignSession(), SmQueryInformation(), START_TEST(), svc_getreqset(), vbo_rebase_prims(), write_ip_tfs(), and xprt_register().

#define _ASMAPI

Create a macro so that asm functions can be linked into compilers other than GNU C

Definition at line 270 of file compiler.h.

#define _ASMAPIP   _ASMAPI *

Definition at line 275 of file compiler.h.

#define _NORMAPI

Definition at line 283 of file compiler.h.

#define _NORMAPIP   *

Definition at line 284 of file compiler.h.

#define ASSERT (   X)

ASSERT macro

Definition at line 309 of file compiler.h.

#define CPU_TO_LE32 (   x)    ( x )

Either define MESA_BIG_ENDIAN or MESA_LITTLE_ENDIAN, and CPU_TO_LE32. Do not use these unless absolutely necessary! Try to use a runtime test instead. For now, only used by some DRI hardware drivers for color/texel packing.

Definition at line 250 of file compiler.h.

#define END_FAST_MATH (   x)    (void)(x)

Definition at line 491 of file compiler.h.

Referenced by _tnl_run_pipeline().

#define FLT_MAX_EXP   128

Definition at line 364 of file compiler.h.

#define inline

Get standard integer types Sun compilers define i386 instead of the gcc-style __i386 finite macro. Disable assorted warnings Function inlining

Definition at line 135 of file compiler.h.

#define INLINE   inline

Definition at line 139 of file compiler.h.

#define LE32_TO_CPU (   x)    CPU_TO_LE32( x )

Definition at line 253 of file compiler.h.

#define likely (   x)    (x)

Definition at line 186 of file compiler.h.

Referenced by find_value().

#define LONGSTRING

LONGSTRING macro gcc -pedantic warns about long string literals, LONGSTRING silences that.

Definition at line 341 of file compiler.h.

#define M_E   (2.7182818284590452354)

Definition at line 352 of file compiler.h.

Referenced by create_math().

#define M_LOG2E   (1.4426950408889634074)

Definition at line 356 of file compiler.h.

Referenced by create_math().

#define MESA_LITTLE_ENDIAN   1

Definition at line 251 of file compiler.h.

#define NULL   0

Definition at line 332 of file compiler.h.

#define ONE_DIV_SQRT_LN2   (1.201122408786449815)

Definition at line 360 of file compiler.h.

#define PRINTFLIKE (   f,
  a 
)

Definition at line 328 of file compiler.h.

#define PUBLIC

PUBLIC/USED macros

If we build the library with gcc's -fvisibility=hidden flag, we'll use the PUBLIC macro to mark functions that are to be exported.

We also need to define a USED attribute, so the optimizer doesn't inline a static function that we later use in an alias. - ajax

Definition at line 157 of file compiler.h.

Referenced by BRUSH::_Ret_opt_bytecount_(), CreateBrushInternal(), and IntGdiCreatePatternBrush().

#define START_FAST_MATH (   x)    x = 0

USE_IEEE: Determine if we're using IEEE floating point START/END_FAST_MATH macros:

START_FAST_MATH: Set x86 FPU to faster, 32-bit precision mode (and save original mode to a temporary). END_FAST_MATH: Restore x86 FPU to original mode.

Definition at line 490 of file compiler.h.

Referenced by _tnl_run_pipeline().

#define STATIC_ASSERT (   COND)
Value:
do { \
typedef int static_assertion_failed[(!!(COND))*2-1]; \
} while (0)

Static (compile-time) assertion. Basically, use COND to dimension an array. If COND is false/zero the array size will be -1 and we'll get a compilation error.

Definition at line 319 of file compiler.h.

Referenced by _mesa_alloc_shared_state(), _mesa_get_texel_fetch_func(), _mesa_test_formats(), and alloc_proxy_textures().

#define USED

Definition at line 158 of file compiler.h.

Referenced by dwarfaddrtounit().