Subsystem.SetTriggers Method (Subsystem.TriggerKinds())

This method sets the specified triggers to happen when certain kinds of events are generated. Each element of array triggers specifies the triggers to set for the kind of event specified by the enumerator in enumeration Monitor.MF_EVENT_KIND that corresponds to the index in the array. Array triggers must contain exacly MF_EVENT_KIND.MF_EVENT_KIND_MAX elements, otherwise an exception of type RTX64Exception is thrown. The triggers to be set correspond to the bits that are set in each element of this array. If the Subsystem is not started, this throws method an exception of type RTX64Exception containing an explanatory error message. This method can be called when monitoring is stopped or started. It takes effect immediately. If any of the specified triggers are already set, they remain set. These flag enumerators can be mixed with each other using bitwise operators.

Session triggers set programmatically from monitor event MF_EVENT_KIND_CUSTOM are ignored.

The following kinds of monitoring events cannot have triggers set on them. Attempting to do so will cause an exception of type RTX64Exception to be thrown:

  • MF_EVENT_KIND_RESERVED (Reserved)
  • MF_EVENT_KIND_BUGCHECK_RTSS_RESERVED (Bugcheck RTSS)
  • MF_EVENT_KIND_MARKER (Marker)
  • MF_EVENT_KIND_SUBSYSTEM_STOP (Subsystem Stop)
  • MF_EVENT_KIND_FAST_SEMAPHORE_ACQUIRE (Fast Semaphore Acquire)
  • MF_EVENT_KIND_FAST_SEMAPHORE_RELEASE (Fast Semaphore Release)
  • MF_EVENT_KIND_FAST_SEMAPHORE_RELEASE_ALL (Fast Semaphore Release All)
  • MF_EVENT_KIND_WFSOEX_WAIT (WaitForSingleObjectEx Wait)
  • MF_EVENT_KIND_WFMOEX_WAIT (WaitForMultipleObjectEx Wait)
  • MF_EVENT_KIND_THREAD_SLEEP (Thread Sleep)

The following monitoring events are not generated in RTX64 4.3 and later versions and will be silently ignored:

  • MF_EVENT_KIND_CONTIGUOUS_MEMORY_ALLOC (Contiguous Memory Alloc)
  • MF_EVENT_KIND_CONTIGUOUS_MEMORY_ALLOC_FAIL (Contiguous Memory Alloc Fail)
  • MF_EVENT_KIND_CONTIGUOUS_MEMORY_SPECIFY_CACHE (Contiguous Memory Alloc Specify Cache)
  • MF_EVENT_KIND_CONTIGUOUS_MEMORY_SPECIFY_CACHE_FAIL (Contiguous Memory Alloc Specify Cache Fail)
  • MF_EVENT_KIND_CONTIGUOUS_MEMORY_FREE (Contiguous Memory Free)
  • MF_EVENT_KIND_CONTIGUOUS_MEMORY_FAIL (Contiguous Memory Free Fail)
  • MF_EVENT_KIND_LOCAL_MEMORY_EXPAND (Local Memory Expand)
  • MF_EVENT_KIND_LOCAL_MEMORY_SHRINK (Local Memory Shrink)
  • MF_EVENT_KIND_WINDOWS_MEMORY_ALLOC (Windows Memory Alloc)
  • MF_EVENT_KIND_WINDOWS_MEMORY_ALLOC_FAIL (Windows Memory Alloc Fail)
  • MF_EVENT_KIND_WINDOWS_MEMORY_FREE (Windows Memory Free)
  • MF_EVENT_KIND_WINDOWS_MEMORY_FREE_FAIL (Windows Memory Free Fail)
Triggers do not persist after the RTX64 Subsystem stops. If persistence is desired, it is the client's responsibility to save trigger state before the Subsystem stops and to restore it when the Subsystem starts. This method is thread-safe and executes atomically across all processes with respect to all other trigger-related methods.
 
IMPORTANT: This method only accumulates new triggers. It never resets a trigger. Thus, if a given kind of event has trigger X set, and this method is called to set only trigger Y for that kind of event, then that kind of event ends up with both trigger X and Y set.

Namespace:  IntervalZero.RTX64.Monitor
Assembly:  IntervalZero.RTX64 (in IntervalZero.RTX64.dll) Version: 4.0.0.0 (File version: 4.5.0)

Syntax
public void SetTriggers(
	Subsystem.TriggerKinds[] triggers
)

Parameters

triggers
Type: IntervalZero.RTX64.Monitor.Subsystem.TriggerKinds

Implements

IMonitorSubsystem.SetTriggers(Subsystem.TriggerKinds)
Exceptions
ExceptionCondition
RTX64Exception Thrown if this method is used without the RTX64 Runtime installed.
See Also