suricata
threads-arch-tile.h File Reference
#include <tmc/spin.h>
#include <arch/cycle.h>
Include dependency graph for threads-arch-tile.h:

Go to the source code of this file.

Macros

#define SCCtrlMutex   pthread_mutex_t
 
#define SCCtrlMutexAttr   pthread_mutexattr_t
 
#define SCCtrlMutexInit(mut, mutattr)   pthread_mutex_init(mut, mutattr)
 
#define SCCtrlMutexLock(mut)   pthread_mutex_lock(mut)
 
#define SCCtrlMutexTrylock(mut)   pthread_mutex_trylock(mut)
 
#define SCCtrlMutexUnlock(mut)   pthread_mutex_unlock(mut)
 
#define SCCtrlMutexDestroy   pthread_mutex_destroy
 
#define SCCtrlCondT   pthread_cond_t
 
#define SCCtrlCondInit   pthread_cond_init
 
#define SCCtrlCondSignal   pthread_cond_signal
 
#define SCCtrlCondTimedwait   pthread_cond_timedwait
 
#define SCCtrlCondWait   pthread_cond_wait
 
#define SCCtrlCondDestroy   pthread_cond_destroy
 
#define SCMutex   tmc_spin_queued_mutex_t
 
#define SCMutexAttr
 
#define SCMutexDestroy(x)   ({ (void)(x); 0; })
 
#define SCMUTEX_INITIALIZER   TMC_SPIN_QUEUED_MUTEX_INIT
 
#define SCMutexInit(mut, mutattr)
 
#define SCMutexLock(mut)
 
#define SCMutexTrylock(mut)
 
#define SCMutexUnlock(mut)
 
#define SCCondT   uint8_t
 
#define SCCondInit(x, y)   ({ 0; })
 
#define SCCondSignal(x)   ({ 0; })
 
#define SCCondDestroy(x)   ({ 0; })
 
#define SCCondWait(x, y)   cycle_sleep(300)
 
#define SCSpinlock   tmc_spin_queued_mutex_t
 
#define SCSpinLock(spin)   ({ tmc_spin_queued_mutex_lock(spin); 0; })
 
#define SCSpinTrylock(spin)   (tmc_spin_queued_mutex_trylock(spin) ? EBUSY : 0)
 
#define SCSpinUnlock(spin)   ({ tmc_spin_queued_mutex_unlock(spin); 0; })
 
#define SCSpinInit(spin, spin_attr)   ({ tmc_spin_queued_mutex_init(spin); 0; })
 
#define SCSpinDestroy(spin)   ({ (void)(spin); 0; })
 
#define SCRWLock   tmc_spin_rwlock_t
 
#define SCRWLockDestroy(x)   ({ (void)(x); 0; })
 
#define SCRWLockInit(rwl, rwlattr)   ({ tmc_spin_rwlock_init(rwl); 0; })
 
#define SCRWLockWRLock(rwl)   ({ tmc_spin_rwlock_wrlock(rwl); 0; })
 
#define SCRWLockRDLock(rwl)   ({ tmc_spin_rwlock_rdlock(rwl); 0; })
 
#define SCRWLockTryWRLock(rwl)   (tmc_spin_rwlock_trywrlock(rwl) ? EBUSY : 0)
 
#define SCRWLockTryRDLock(rwl)   (tmc_spin_rwlock_tryrdlock(rwl) ? EBUSY : 0)
 
#define SCRWLockUnlock(rwl)   ({ tmc_spin_rwlock_unlock(rwl); 0; })
 

Detailed Description

Author
Ken Steele, Tilera Corporation suric.nosp@m.ata@.nosp@m.tiler.nosp@m.a.co.nosp@m.m

Definition in file threads-arch-tile.h.

Macro Definition Documentation

#define SCCondDestroy (   x)    ({ 0; })

Definition at line 85 of file threads-arch-tile.h.

#define SCCondInit (   x,
 
)    ({ 0; })

Definition at line 83 of file threads-arch-tile.h.

Referenced by GlobalsInitPreConfig(), PacketPoolInit(), and PacketPoolInitEmpty().

#define SCCondT   uint8_t

Definition at line 82 of file threads-arch-tile.h.

#define SCCondWait (   x,
 
)    cycle_sleep(300)
#define SCCtrlCondDestroy   pthread_cond_destroy

Definition at line 51 of file threads-arch-tile.h.

Referenced by TmThreadInitMC().

#define SCCtrlCondInit   pthread_cond_init
#define SCCtrlCondSignal   pthread_cond_signal
#define SCCtrlCondT   pthread_cond_t

Definition at line 46 of file threads-arch-tile.h.

#define SCCtrlCondTimedwait   pthread_cond_timedwait

Definition at line 49 of file threads-arch-tile.h.

Referenced by StatsSetUI64().

#define SCCtrlCondWait   pthread_cond_wait

Definition at line 50 of file threads-arch-tile.h.

#define SCCtrlMutex   pthread_mutex_t

Definition at line 37 of file threads-arch-tile.h.

Referenced by RunModeUnixSocketGetDefaultMode().

#define SCCtrlMutexAttr   pthread_mutexattr_t

Definition at line 38 of file threads-arch-tile.h.

#define SCCtrlMutexDestroy   pthread_mutex_destroy

Definition at line 43 of file threads-arch-tile.h.

Referenced by TmThreadInitMC().

#define SCCtrlMutexInit (   mut,
  mutattr 
)    pthread_mutex_init(mut, mutattr)
#define SCCtrlMutexLock (   mut)    pthread_mutex_lock(mut)
#define SCCtrlMutexTrylock (   mut)    pthread_mutex_trylock(mut)

Definition at line 41 of file threads-arch-tile.h.

#define SCCtrlMutexUnlock (   mut)    pthread_mutex_unlock(mut)
#define SCMUTEX_INITIALIZER   TMC_SPIN_QUEUED_MUTEX_INIT
#define SCMutexAttr

Definition at line 56 of file threads-arch-tile.h.

#define SCMutexLock (   mut)
Value:
({ \
int ret = 0; \
tmc_spin_queued_mutex_lock(mut); \
ret; \
})

Definition at line 64 of file threads-arch-tile.h.

Referenced by AffinityGetNextCPU(), AppLayerHtpPrintStats(), DecodeRegisterPerfCounters(), DecodeUnregisterCounters(), DefragGetTrackerFromHash(), DefragLookupTrackerFromHash(), DefragRbFragCompare(), DefragTrackerFreeFrags(), DetectDNP3Register(), DetectEngineAddToMaster(), DetectEngineBumpVersion(), DetectEngineEnabled(), DetectEngineGetByTenantId(), DetectEngineGetCurrent(), DetectEngineGetVersion(), DetectEngineInspectBufferGeneric(), DetectEngineMoveToFreeList(), DetectEngineMTApply(), DetectEngineMultiTenantSetup(), DetectEnginePruneFreeList(), DetectEngineReloadIsIdle(), DetectEngineReloadIsStart(), DetectEngineReloadSetIdle(), DetectEngineReloadStart(), DetectFlowbitsAnalyze(), DetectLoaderQueueTask(), DetectLoadersSync(), DetectMarkDataFree(), EngineAnalysisRulesFailure(), FlowDisableFlowManagerThread(), FlowDisableFlowRecyclerThread(), FTPAtExitPrintStats(), HostGetHostFromHash(), HostLock(), HostLookupHostFromHash(), HTPAtExitPrintStats(), HTPStateFree(), IPFWRegisterQueue(), IPPairCleanup(), IPPairGetIPPairFromHash(), IPPairLock(), IPPairLookupIPPairFromHash(), LogFileFreeCtx(), LogFileWrite(), NFQRegisterQueue(), NoWinDivertSupportExit(), OutputRegisterFiledataLogger(), PacketAlertThreshold(), PacketPoolReturnPacket(), PacketPoolWait(), PacketPoolWaitForN(), PacketProfileLoggertIdToString(), PoolThreadFree(), PoolThreadGetById(), PoolThreadGrow(), PoolThreadInit(), PoolThreadReturn(), ReceiveNFQThreadDeinit(), ReceiveNFQThreadInit(), ReceivePcapThreadInit(), ReceivePfringThreadInit(), RegisterDNP3Parsers(), SCBPFCompile(), SCLogAddFDFilter(), SCLogCheckFDFilterEntry(), SCLogCheckFDFilterExit(), SCLogMatchFDFilter(), SCLogMessage(), SCLogPrintFDFilters(), SCLogPrintFGFilters(), SCLogReleaseFDFilters(), SCLogReleaseFGFilters(), SCLogRemoveFDFilter(), SRepDestroy(), StatsSetUI64(), StatsUpdateCounterArray(), StreamTcpFreeConfig(), StreamTcpInitConfig(), StreamTcpReassembleFree(), StreamTcpReassembleGetMemcap(), StreamTcpReassembleInitThreadCtx(), StreamTcpSessionClear(), StreamTcpThreadInit(), TmModuleDecodeAFPRegister(), TmModuleDecodeIPFWRegister(), TmModuleDecodeNetmapRegister(), TmqDebugList(), TmqhInputFlow(), TmqhInputSimple(), TmqhOutputFlowHash(), TmqhOutputFlowIPPair(), TmqhOutputPacketpool(), TmqhOutputSimple(), TmqhOutputVerdictNfq(), TmreadsGetMinimalTimestamp(), TmSlotGetSlotForTM(), TmThreadAppend(), TmThreadCheckThreadState(), TmThreadClearThreadsFamily(), TmThreadContinueDetectLoaderThreads(), TmThreadContinueThreads(), TmThreadCountThreadsByTmmFlags(), TmThreadDisablePacketThreads(), TmThreadDisableReceiveThreads(), TmThreadGetFirstTmSlotForPartialPattern(), TmThreadKillThreadsFamily(), TmThreadPauseThreads(), TmThreadRemove(), TmThreadsGetCallingThread(), TmThreadsGetTVContainingSlot(), TmThreadsInjectPacketsById(), TmThreadsListThreads(), TmThreadsRegisterThread(), TmThreadsSetThreadTimestamp(), TmThreadsSlotVarRun(), TmThreadsUnregisterThread(), TmThreadWaitOnThreadInit(), TmThreadWakeupDetectLoaderThreads(), TmValidateQueueState(), VarNameStoreActivateStaging(), VarNameStoreFree(), VarNameStoreFreeOld(), VarNameStoreSetupAdd(), VarNameStoreSetupLookup(), and VarNameStoreSetupStaging().

#define SCMutexTrylock (   mut)
Value:
({ \
int ret = (tmc_spin_queued_mutex_trylock(mut) == 0) ? 0 : EBUSY; \
ret; \
})

Definition at line 69 of file threads-arch-tile.h.

Referenced by DefragLookupTrackerFromHash(), HostGetActiveCount(), HostLookupHostFromHash(), IPPairGetActiveCount(), and IPPairLookupIPPairFromHash().

#define SCMutexUnlock (   mut)
Value:
({ \
int ret = 0; \
tmc_spin_queued_mutex_unlock(mut); \
ret; \
})

Definition at line 73 of file threads-arch-tile.h.

Referenced by AffinityGetNextCPU(), AppLayerHtpPrintStats(), DecodeRegisterPerfCounters(), DecodeUnregisterCounters(), DefragLookupTrackerFromHash(), DefragRbFragCompare(), DefragTrackerFreeFrags(), DefragTrackerRelease(), DetectDNP3Register(), DetectEngineAddToMaster(), DetectEngineBumpVersion(), DetectEngineEnabled(), DetectEngineGetByTenantId(), DetectEngineGetCurrent(), DetectEngineGetVersion(), DetectEngineInspectBufferGeneric(), DetectEngineMoveToFreeList(), DetectEngineMTApply(), DetectEngineMultiTenantSetup(), DetectEnginePruneFreeList(), DetectEngineReloadIsIdle(), DetectEngineReloadIsStart(), DetectEngineReloadSetIdle(), DetectEngineReloadStart(), DetectFlowbitsAnalyze(), DetectLoaderQueueTask(), DetectLoadersSync(), DetectMarkDataFree(), EngineAnalysisRulesFailure(), FlowDisableFlowManagerThread(), FlowDisableFlowRecyclerThread(), FTPAtExitPrintStats(), HostGetActiveCount(), HostLookupHostFromHash(), HostRelease(), HostUnlock(), HTPAtExitPrintStats(), HTPStateFree(), IPFWRegisterQueue(), IPPairGetActiveCount(), IPPairLookupIPPairFromHash(), IPPairRelease(), IPPairUnlock(), LogFileFreeCtx(), LogFileWrite(), NFQRegisterQueue(), NoWinDivertSupportExit(), OutputRegisterFiledataLogger(), PacketAlertThreshold(), PacketPoolReturnPacket(), PacketPoolWait(), PacketPoolWaitForN(), PacketProfileLoggertIdToString(), PoolThreadFree(), PoolThreadGetById(), PoolThreadGrow(), PoolThreadInit(), PoolThreadReturn(), ReceiveNFQThreadDeinit(), ReceiveNFQThreadInit(), ReceivePcapThreadInit(), ReceivePfringThreadInit(), RegisterDNP3Parsers(), SCBPFCompile(), SCLogAddFDFilter(), SCLogCheckFDFilterEntry(), SCLogCheckFDFilterExit(), SCLogMatchFDFilter(), SCLogMessage(), SCLogPrintFDFilters(), SCLogPrintFGFilters(), SCLogReleaseFDFilters(), SCLogReleaseFGFilters(), SCLogRemoveFDFilter(), SRepDestroy(), StatsSetUI64(), StatsUpdateCounterArray(), StreamTcpFreeConfig(), StreamTcpInitConfig(), StreamTcpReassembleFree(), StreamTcpReassembleGetMemcap(), StreamTcpReassembleInitThreadCtx(), StreamTcpSessionClear(), StreamTcpThreadInit(), TmModuleDecodeAFPRegister(), TmModuleDecodeIPFWRegister(), TmModuleDecodeNetmapRegister(), TmqDebugList(), TmqhInputFlow(), TmqhInputSimple(), TmqhOutputFlowHash(), TmqhOutputFlowIPPair(), TmqhOutputPacketpool(), TmqhOutputSimple(), TmqhOutputVerdictNfq(), TmreadsGetMinimalTimestamp(), TmSlotGetSlotForTM(), TmThreadAppend(), TmThreadCheckThreadState(), TmThreadClearThreadsFamily(), TmThreadContinueDetectLoaderThreads(), TmThreadContinueThreads(), TmThreadCountThreadsByTmmFlags(), TmThreadDisablePacketThreads(), TmThreadDisableReceiveThreads(), TmThreadGetFirstTmSlotForPartialPattern(), TmThreadKillThreadsFamily(), TmThreadPauseThreads(), TmThreadRemove(), TmThreadsGetCallingThread(), TmThreadsGetTVContainingSlot(), TmThreadsInjectPacketsById(), TmThreadsListThreads(), TmThreadsRegisterThread(), TmThreadsSetThreadTimestamp(), TmThreadsSlotVarRun(), TmThreadsUnregisterThread(), TmThreadWaitOnThreadInit(), TmThreadWakeupDetectLoaderThreads(), TmValidateQueueState(), VarNameStoreActivateStaging(), VarNameStoreFree(), VarNameStoreFreeOld(), VarNameStoreSetupAdd(), VarNameStoreSetupLookup(), and VarNameStoreSetupStaging().

#define SCRWLock   tmc_spin_rwlock_t

Definition at line 106 of file threads-arch-tile.h.

#define SCRWLockDestroy (   x)    ({ (void)(x); 0; })

Definition at line 107 of file threads-arch-tile.h.

#define SCRWLockInit (   rwl,
  rwlattr 
)    ({ tmc_spin_rwlock_init(rwl); 0; })

Definition at line 108 of file threads-arch-tile.h.

#define SCRWLockRDLock (   rwl)    ({ tmc_spin_rwlock_rdlock(rwl); 0; })

Definition at line 110 of file threads-arch-tile.h.

#define SCRWLockTryRDLock (   rwl)    (tmc_spin_rwlock_tryrdlock(rwl) ? EBUSY : 0)

Definition at line 112 of file threads-arch-tile.h.

#define SCRWLockTryWRLock (   rwl)    (tmc_spin_rwlock_trywrlock(rwl) ? EBUSY : 0)

Definition at line 111 of file threads-arch-tile.h.

#define SCRWLockUnlock (   rwl)    ({ tmc_spin_rwlock_unlock(rwl); 0; })

Definition at line 113 of file threads-arch-tile.h.

#define SCRWLockWRLock (   rwl)    ({ tmc_spin_rwlock_wrlock(rwl); 0; })

Definition at line 109 of file threads-arch-tile.h.

#define SCSpinDestroy (   spin)    ({ (void)(spin); 0; })

Definition at line 102 of file threads-arch-tile.h.

Referenced by PacketProfileLoggertIdToString(), and TimeDeinit().

#define SCSpinInit (   spin,
  spin_attr 
)    ({ tmc_spin_queued_mutex_init(spin); 0; })

Definition at line 101 of file threads-arch-tile.h.

Referenced by PacketProfileLoggertIdToString(), and TimeInit().

#define SCSpinlock   tmc_spin_queued_mutex_t

Definition at line 97 of file threads-arch-tile.h.

Referenced by PacketProfileLoggertIdToString().

#define SCSpinLock (   spin)    ({ tmc_spin_queued_mutex_lock(spin); 0; })

Definition at line 98 of file threads-arch-tile.h.

Referenced by PacketProfileLoggertIdToString(), TimeGet(), and TimeSet().

#define SCSpinTrylock (   spin)    (tmc_spin_queued_mutex_trylock(spin) ? EBUSY : 0)

Definition at line 99 of file threads-arch-tile.h.

#define SCSpinUnlock (   spin)    ({ tmc_spin_queued_mutex_unlock(spin); 0; })

Definition at line 100 of file threads-arch-tile.h.

Referenced by PacketProfileLoggertIdToString(), TimeGet(), and TimeSet().