NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ATTRIBUTES | SEE ALSO
#include <mon/chMon.h>int svThreadMonConst(MonThreadConst *constants, int size);
MON
The svThreadMonConst kernel call fills the MonThreadConst structure pointed to by the constants parameter. The size parameter must be set to sizeof(MonThreadConst). It is provided for compatibility between different releases of the kernel. The members of the MonThreadConst structure are the following:
int thrName_offset ; int thrName_sizeof ; int thrLid_offset ; int thrStatus_offset ; int thrStatusWaiting_mask ; int thrInternalVtime_offset ; int thrTotalVtime_offset ; |
They specify monitoring constants related to threads, and offsets which detail the layout of the MonThreadState structure (the MonThreadState structure gives the internal representation of a thread within the kernel data space, see svThreadProbeConnect(2MON)).
The thrName_offset member is the offset of the string representing the name of the thread and the thrName_sizeof member is the space reserved for the name.
The thrLid_offset member is the offset of the local identifier of the thread.
The thrStatus_offset member is the offset of the "signal status". By doing a logical "and" with the signal status and the thrStatusWaiting_mask mask, you can find out whether the thread is waiting (out of the run queue) or not.
The thrInternalVtime_offset member is the offset of the KnTimeVal structure which represents the time the thread has spent running in its home actor.
The thrTotalVtime_offset member is the offset of the KnTimeVal structure which represents the total time the thread has spent running.
The semantics of the members of the MonThreadConst structure is summarized by the following lines of pseudo-code:
MonThreadState* state ; char (state + thrName_offset) [thrName_sizeof] ; int* (state + thrLid_offset) ; Bool* (state + thrStatus) & thrStatusWaiting_mask ; #include <util/chKnTimeVal.h> KnTimeVal* (state + thrInternalVtime_offset) ; KnTimeVal* (state + thrTotalVtime_offset) ; |
The special K_ENOTIMP value indicates that the corresponding offset or constant does not apply to this particular release of the micro-kernel.
The return value is set to the size in bytes of the MonThreadConst object.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
svSiteMonConst(2MON), svActorMonConst(2MON), svPortMonConst(2MON), svThreadProbeConnect(2MON), threadName(2K)
NAME | SYNOPSIS | FEATURES | DESCRIPTION | RETURN VALUE | ATTRIBUTES | SEE ALSO