Go to the documentation of this file. 1 #ifndef _OME_EXEC_QUEUE_H
2 #define _OME_EXEC_QUEUE_H "$Id: OMEexecQueue.h 349 2020-05-21 04:19:56Z geoff $"
15 #define OME_MAX_PRIORITY_LEVELS 5
16 #define OME_DEFAULT_THREAD_PRIORITY 3
44 const uint_fast16_t maxWanted, uint_fast8_t *prio =
nullptr,
bool restartAtTop=
true);
OMEtype thisMethod
Definition: OMEthread.h:36
uint_fast32_t totalQueuedAtLevel(uint_fast8_t l) const OME_ALWAYS_INLINE
Definition: OMEexecQueue.h:52
Ïúíþ ð Ø ˜ ˜ __text __TEXT € __apple_names __DWARF __apple_objc __DWARF __apple_namespac__DWARF H X __apple_types __DWARF l
Definition: tmp3.o.cpp:1
int OMEterminateThreadsOnObject(const OMEobject *obj)
Definition: OMEexecQueue.cpp:591
@ OME_THREAD_RUNNING
thread is active
Definition: OMEthread.h:21
int execProcess(OMEthread *thread, OMEtype &result, const OMEtype &args)
Definition: OMEexec.cpp:6
int OMEexecuteOIL2threads(const uint_fast32_t count)
Definition: OMEexecQueue.cpp:566
#define OME_MAX_PRIORITY_LEVELS
Definition: OMEexecQueue.h:15
void OMEstartCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:217
void OMEinitializeOIL2threadQueue(const int cpuCount, const int multiThreshold)
Definition: OMEexecQueue.cpp:512
#define MIN_WORK_FOR_MULTI_DEFAULT
Definition: OMEexecQueue.cpp:32
OMEthreadStates getThreadState() const OME_ALWAYS_INLINE
Definition: OMEthread.h:119
@ OME_THREAD_TERMINATED
thread is terminated
Definition: OMEthread.h:23
uint_fast32_t OMEwaitForThreadsToStop(uint_fast32_t maxWaitTime)
Request loiter threads to terminate and wait for them to terminate.
Definition: OMEexecQueue.cpp:485
const OMEoid & getThisOID() const OME_ALWAYS_INLINE
Definition: OMEthread.h:154
int OMEsetConditionVariable(OME_CONDITION_TYPE *var)
Definition: OMEmutex.cpp:204
int OMEwaitForCondition(OME_CONDITION_TYPE *var, eOMEcriticalSectionLabel mutexID)
Definition: OMEmutex.cpp:172
uint_fast32_t totalThreadsInQueue
Definition: OMEexecQueue.h:24
Fundamental ANY type for FARGOS/VISTA Object Management Environment.
Definition: OMEbaseType.h:250
Base class and abstract interface for an object within a FARGOS/VISTA Object Management Environment.
Definition: OMEobject.h:22
int OMEinitConditionVariable(OME_CONDITION_TYPE *var)
Definition: OMEmutex.cpp:130
OME_FAST_CALL void addThreadToQueue(OMEthread *t, int prio=OME_DEFAULT_THREAD_PRIORITY)
Definition: OMEexecQueue.cpp:39
uint_fast8_t lastLevel
Definition: OMEexecQueue.h:25
void outputOnStream(std::ostream &o=std::cout) const
Definition: OMEthread.cpp:1172
OME_FAST_CALL uint_fast32_t executeSlices(const uint_fast32_t maxCount)
Definition: OMEexecQueue.cpp:239
OME_FAST_CALL uint_fast16_t getNextThreads(OMEthread *v[], const uint_fast16_t maxWanted, uint_fast8_t *prio=nullptr, bool restartAtTop=true)
Definition: OMEexecQueue.cpp:155
#define OME_MAX_CPUS_PERMITTED
Definition: OMEmutex.h:79
const char srcID[]
Definition: catSym.c:17
OMEthreadExecQueue()
Definition: OMEexecQueue.h:29
void executeSlice()
Definition: OMEthread.cpp:1119
#define INCREMENT_COUNTER32_BY(v, amt)
Definition: OMEexecQueue.cpp:14
void terminateThread()
Definition: OMEthread.cpp:1094
int OMEwaitForNativeThread(uint64_t pid, void **retValue)
Definition: OMEmutex.cpp:312
#define OME_EXPECT_TRUE(expr)
Annotation macro for conditional expression expected to be true.
Definition: compiler_hints.h:541
OMEcallStack * callStack
Definition: OMEthread.h:74
OME_FAST_CALL void finishSlice(OMEthread *)
Definition: OMEexecQueue.cpp:222
int getThreadPriority() const OME_ALWAYS_INLINE
Definition: OMEthread.h:123
#define OME_DEFAULT_THREAD_PRIORITY
Definition: OMEexecQueue.h:16
#define OME_CONDITION_TYPE
Definition: timed_mutex.hpp:18
int OMEshutdown(OMEthread *thread, OMEtype &result)
OIL2 interface routine to request shutdown of FARGOS/VISTA Object Management Environment via OMEreque...
Definition: OMEexecQueue.cpp:601
#define MAX_ARGS
Definition: OMEexec.cpp:3
OME_FAST_CALL int terminateThreadsOnObject(const OMEobject *obj)
Definition: OMEexecQueue.cpp:82
SMV_StandaloneNumeric< uint32_t > OMEstopFlag("stopFlag")
External flag used to trigger stop of a FARGOS/VISTA Object Management Environment.
uint_fast32_t totalQueued() const OME_ALWAYS_INLINE
Definition: OMEexecQueue.h:54
const char srcID[] OME_USED
Definition: tick_time.cpp:24
Record to define the implementation of an OIL2 function.
Definition: OMEthread.h:287
void OMEendCriticalSection(eOMEcriticalSectionLabel regionID)
Definition: OMEmutex.cpp:236
virtual void setValue(const OMEtype &newV) override
Set the variable's value.
Definition: OMEdebugInfo.h:200
@ OME_CRITICAL_SECTION_KERNEL_THREAD
Definition: OMEmutex.h:44
#define OME_EXPECT_FALSE(expr)
Annotation macro for conditional expression expected to be false.
Definition: compiler_hints.h:540
#define OME_ALWAYS_INLINE
Tell the compiler to alway inline a function, regardless of optimization level.
Definition: compiler_hints.h:364
OME_FAST_CALL uint_fast32_t parallelExecuteSlices(const uint_fast32_t maxCount)
Definition: OMEexecQueue.cpp:365
Implements thread queues with multiple levels of priority.
Definition: OMEexecQueue.h:21
#define OME_FAST_CALL
Definition: compiler_hints.h:468
#define THREAD_REQUEST_COUNT
Definition: OMEexecQueue.cpp:31
OME_FAST_CALL bool removeSpecificThreadFromQueue(OMEthread *t, int prio=-1)
Definition: OMEexecQueue.cpp:54
~OMEthreadExecQueue()
Definition: OMEexecQueue.h:34
void OMEstopLoiterThreads()
Definition: OMEexecQueue.cpp:469
void OMErequestShutdown()
Definition: OMEioEvents.cpp:572
#define _STD
Definition: OMEmanifests.h:146
OMEtype * nextElement()
Iterate over a set by retrieving the next element.
Definition: OMEset.cpp:280
OME debug and profiling interfaces.
Public interface to an OME thread.
Definition: OMEthread.h:60
#define LOG_ENDLINE
Closing clause for text line output using << operators.
Definition: logging_api.hpp:2956
uint64_t OMEcallWithNativeThread(OMEnativeTaskFP func, void *functionArg)
Definition: OMEmutex.cpp:283
void resetIterator()
Reset the internal iterator to the beginning of the list.
Definition: OMEset.cpp:264
class OMEset * set
Definition: OMEbaseType.h:298
const class OMEobject * getInstanceInMemory() const
Return object information record.
Definition: OMEoid.h:280
@ OME_CRITICAL_SECTION_THREAD_QUEUE
Definition: OMEmutex.h:41
_STD deque< OMEthreadP > threadList[OME_MAX_PRIORITY_LEVELS]
Definition: OMEexecQueue.h:23
#define LOG_CERR(lvl)
Convenience macro that uses LOG_INTO() to conditionally log a message to standard error.
Definition: logging_api.hpp:3014
void OMEqueueOIL2thread(OMEthread *t)
Definition: OMEexecQueue.cpp:586