NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | PARAMETERS | RETURN VALUES | ATTRIBUTES | SEE ALSO
#include <mon/chMon.h>int svThreadMonConst(MonThreadConst *constants, int size);
The function or functions documented here may not be used safely in all application contexts with all APIs provided in the ChorusOS 5.0 product.
See API(5FEA) for details.
MON
The svThreadMonConst() microkernel 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 microkernel.
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 microkernel 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". Logically and-ing the signal status and the thrStatusWaiting_mask mask makes it possible to 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 pseudocode:
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 microkernel.
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 | API RESTRICTIONS | FEATURES | DESCRIPTION | PARAMETERS | RETURN VALUES | ATTRIBUTES | SEE ALSO