suricata
util-optimize.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define likely(expr)   __builtin_expect(!!(expr), 1)
 
#define unlikely(expr)   __builtin_expect(!!(expr), 0)
 
#define cc_barrier()   __asm__ __volatile__("": : :"memory")
 
#define hw_barrier()   __sync_synchronize()
 

Detailed Description

Macro Definition Documentation

#define cc_barrier ( )    __asm__ __volatile__("": : :"memory")

from http://en.wikipedia.org/wiki/Memory_ordering

C Compiler memory barrier

Definition at line 43 of file util-optimize.h.

Referenced by PacketPoolWait().

#define hw_barrier ( )    __sync_synchronize()

from http://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html

Hardware memory barrier

Definition at line 49 of file util-optimize.h.

#define unlikely (   expr)    __builtin_expect(!!(expr), 0)

Definition at line 35 of file util-optimize.h.

Referenced by __attribute__(), AddVariableToResolveList(), AFPPeersListCheck(), AlertFastLogger(), AlertFastLogInitCtx(), AlertFastLogThreadInit(), AppLayerHtpPrintStats(), AppLayerParserGetStateProgress(), AppLayerParserTransactionsCleanup(), BloomFilterCountingInit(), BloomFilterInit(), BoyerMoore(), BoyerMooreCtxInit(), BoyerMooreNocase(), CaptureStatsUpdate(), CleanupPcapFileDirectoryVars(), CleanupPcapFileFileVars(), ComputeSHA1(), ConfLoadCompleteIncludePath(), ConfNodeDump(), ConfNodeNew(), ConfSet(), ConfSetFinal(), ConfSetFromString(), DCERPCInit(), DecodeCIPRequestPathPDU(), DecodeEthernet(), DecodeGRE(), DecodeICMPV4(), DecodeICMPV6(), DecodeIPFW(), DecodeIPV4(), DecodeIPV6(), DecodeIPV6FragHeader(), DecodeMPLS(), DecodeNFQ(), DecodeNull(), DecodePPP(), DecodePPPOESession(), DecodeRaw(), DecodeSCTP(), DecodeSll(), DecodeTCP(), DecodeUDP(), DecodeVLAN(), DefragInitConfig(), DefragTrackerFreeFrags(), DefragTrackerMoveToSpare(), Detect(), DetectAckRegister(), DetectAddressHeadInit(), DetectAddressInit(), DetectAddressParseString(), DetectAppLayerEventRegister(), DetectAppLayerInspectEngineRegister(), DetectAppLayerInspectEngineRegister2(), DetectAsn1Register(), DetectBase64DecodeDoMatch(), DetectByteExtractDoMatch(), DetectBytejumpDoMatch(), DetectBytetestDoMatch(), DetectCipServiceRegister(), DetectContentParse(), DetectCsumRegister(), DetectDetectionFilterRegister(), DetectDsizeRegister(), DetectEngineAppInspectionEngine2Signature(), DetectEngineEventRegister(), DetectEngineInspectBufferGeneric(), DetectEngineStateAlloc(), DetectEngineThreadCtxInit(), DetectEnipCommandRegister(), DetectFileextRegister(), DetectFilemagicRegister(), DetectFilenameRegister(), DetectFilesizeRegister(), DetectFilestorePostMatch(), DetectFlagsRegister(), DetectFlagsSignatureNeedsSynOnlyPackets(), DetectFlowbitMatch(), DetectFlowbitsAnalyze(), DetectFlowintMatch(), DetectFlowMatch(), DetectFlowvarMatch(), DetectFlowvarPostMatchSetup(), DetectFragBitsRegister(), DetectFragOffsetFree(), DetectFragOffsetRegister(), DetectFtpbounceRegister(), DetectFtpdataRegister(), DetectGeoipRegister(), DetectHostbitFree(), DetectHttpRequestLineRegister(), DetectHttpUriSetup(), DetectIcmpIdFree(), DetectIcmpIdRegister(), DetectIcmpSeqRegister(), DetectIdRegister(), DetectIpOptsFree(), DetectIPProtoRegister(), DetectIPProtoRemoveAllSMs(), DetectIPRepRegister(), DetectIsdataatRegister(), DetectL3ProtoRegister(), DetectLoadCompleteSigPath(), DetectLuaRegister(), DetectMarkRegister(), DetectNfsProcedureRegister(), DetectNfsVersionRegister(), DetectParseDupSigHashFree(), DetectPcrePayloadMatch(), DetectPktvarRegister(), DetectPortListsAreEqual(), DetectReferenceFree(), DetectRegisterThreadCtxFuncs(), DetectRegisterThreadCtxGlobalFuncs(), DetectReplaceAddToList(), DetectReplaceFreeInternal(), DetectRpcRegister(), DetectSeqRegister(), DetectSetFastPatternAndItsId(), DetectSetupParseRegexes(), DetectSshSoftwareVersionRegister(), DetectSshVersionRegister(), DetectSslVersionRegister(), DetectStreamSizeFree(), DetectStreamSizeRegister(), DetectTagRegister(), DetectTemplate2Register(), DetectTemplateRegister(), DetectThresholdRegister(), DetectTlsRegister(), DetectTlsValidityRegister(), DetectTlsVersionRegister(), DetectTosRegister(), DetectTtlRegister(), DetectUricontentRegister(), DetectUrilenRegister(), DetectVarStoreMatch(), DetectVarStoreMatchKeyValue(), DetectWindowRegister(), DetectXbitMatchHost(), DetectXbitsRegister(), DNP3FreeObjectPointList(), DNP3PointListAlloc(), DNSSetEvent(), DNSStateAlloc(), DNSStoreAnswerInState(), DNSStoreQueryInState(), EngineAnalysisFP(), EngineAnalysisRulesFailure(), EngineDone(), FileContainerAlloc(), FileContainerFree(), FlowAlloc(), FlowForceReassemblyForFlow(), FlowGetFlowFromHash(), FlowInitConfig(), FlowStorageRegister(), FlowVarAddIdValue(), FlowVarAddIntNoLock(), FlowVarAddKeyValue(), FTPMemcapGlobalCounter(), HashListTableAdd(), HashListTableInit(), HashTableAdd(), HashTableInit(), HostAlloc(), HostBitsTimedoutCheck(), HostFreeStorage(), HostInitConfig(), HTPCalloc(), HtpConfigRestoreBackup(), HTPFreeConfig(), HTPMalloc(), HTPStateFree(), HttpHeaderExpandBuffer(), ICMPv4GetCounterpart(), InitPcapFile(), IPOnlyCIDRListFree(), IPPairAlloc(), IPPairBitsTimedoutCheck(), IPPairInitConfig(), IPPairStorageRegister(), isAndX(), LiveRegisterDevice(), LiveRegisterDeviceName(), LogCustomFormatAlloc(), LogCustomFormatNodeAlloc(), LogHttpLogInitCtx(), LogHttpLogThreadInit(), LogStatsLogThreadDeinit(), LogStatsLogThreadInit(), LogTcpDataLogInitCtx(), LogTcpDataLogThreadInit(), MemBufferCreateNew(), MemBufferExpand(), MimeDecAddEntity(), MimeDecAddField(), MimeDecFindField(), MimeDecInitParser(), MpmAddPatternCI(), MpmFactoryGetMpmCtxForProfile(), MpmFactoryRegisterMpmCtxProfile(), NapatechGetCurrentStats(), NapatechPacketLoopZC(), NapatechStreamThreadInit(), NoNFLOGSupportExit(), NoWinDivertSupportExit(), OutputJsonRegister(), OutputRegisterFiledataModule(), OutputRegisterFiledataSubModule(), OutputRegisterFileModule(), OutputRegisterFileRotationFlag(), OutputRegisterFileSubModule(), OutputRegisterFlowModule(), OutputRegisterFlowSubModule(), OutputRegisterPacketModule(), OutputRegisterPacketSubModule(), OutputRegisterStatsModule(), OutputRegisterStatsSubModule(), OutputRegisterStreamingModule(), OutputRegisterStreamingSubModule(), PacketCallocExtPkt(), PacketCopyDataOffset(), PacketCreateMask(), PacketDefragPktSetup(), PacketGetFromAlloc(), PacketPoolInit(), PacketSetData(), PacketTunnelPktSetup(), PcapDetermineDirectoryOrFile(), PcapFileDispatch(), PcapFileGlobalInit(), PcapLogProfileSetup(), PerCentEncodingMatch(), PktVarAdd(), PktVarAddKeyValue(), PoolInit(), PoolPrintSaturation(), PoolThreadInit(), PrefilterAddSidsResize(), ReceiveAFPLoop(), ReceiveAFPThreadInit(), ReceiveErfDagLoop(), ReceiveErfDagThreadInit(), ReceiveErfFileLoop(), ReceiveErfFileThreadInit(), ReceiveIPFWLoop(), ReceiveNFQThreadInit(), ReceivePcapLoop(), ReceivePcapThreadInit(), ReceivePfringLoop(), ReceivePfringThreadInit(), ROHashInit(), RunmodeAutoFpCreatePickupQueuesString(), RunModeDispatch(), RunModeIdsAFPRegister(), RunModeIdsNetmapRegister(), RunModeIdsNflogRegister(), RunModeIdsPcapRegister(), RunModeIdsPfringRegister(), RunModeNapatechRegister(), RunModeRegisterNewRunMode(), RunModeSetLiveCaptureAutoFp(), RunModeSetLiveCaptureWorkers(), RunModeShutDown(), RunModeTileMpipeRegister(), RunModeUnixSocketGetDefaultMode(), SCAsn1CtxNew(), SCConfLogOpenGeneric(), SCLogLoadConfig(), SCProfilingInit(), SCProfilingRulesGlobalInit(), SCProtoNameInit(), SCRadixPrintTree(), SCThresholdConfInitContext(), SCTimeToStringPattern(), SigAlloc(), SigGroupHeadInitDataFree(), SigGroupHeadStore(), SigMatchAlloc(), SigMatchSignaturesGetSgh(), SigParse(), SigParseApplyDsizeToContent(), SigStringAlloc(), SMTPStateAlloc(), SRepLoadFileFromFD(), SSLVersionToString(), StorageAllocById(), StorageFinalize(), StorageRegister(), StreamTcpPacket(), StreamTcpReassembleGetMemcap(), StreamTcpReassembleInitThreadCtx(), StreamTcpSessionPktFree(), StreamTcpThreadInit(), SupportFastPatternForSigMatchList(), TagHostHasTag(), TAILQ_HEAD(), TcpSackCompare(), ThresholdIPPairTimeoutCheck(), TimeGet(), TLSGetIPInformations(), TmModuleDecodeAFPRegister(), TmModuleDecodeNetmapRegister(), TmModuleDecodePcapRegister(), TmqhOutputFlowSetupCtx(), TmSlotSetFuncAppend(), TmThreadCreate(), TmThreadSetGroupName(), TmThreadsSetThreadTimestamp(), TmThreadsSlotVarRun(), Unified2AlertInitCtx(), Unified2AlertThreadInit(), UnixSocketPcapFile(), UTHBuildFlow(), UTHBuildPacketArrayFromEth(), UTHBuildPacketFromEth(), UTHBuildPacketIPV6Real(), and UTHBuildPacketReal().