NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | PARAMETERS | EXTENDED DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
#include <mon/chMon.h>int svActorProbeConnect(KnCap * cap, MonActorProbe * probe);
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 svActorProbeConnect() and svActorProbeDisconnect() microkernel calls connect and disconnect a monitoring probe to or from an actor, respectively.
The cap parameter is a pointer to the capability of the target actor. The probe parameter describes the monitoring probe. It is a pointer to a MonActorProbe structure whose member is the following:
MonActorVtbl* vtbl;
The vtbl member specifies the notification routines associated with the probe. It is a pointer to a MonActorVtbl structure whose members are the following:
int vtbl_sizeof; Actor_connection connection; Actor_disconnection disconnection; Actor_deletion deletion; Actor_nextThread nextThread; Actor_nextPort nextPort;
The vtbl_sizeof member must be set to sizeof(MonActorVtbl) . It is provided for compatibility between different releases of the microkernel.
The other members of the MonActorVtbl structure are pointers to functions. Each member must either be NULL or point to the implementation of a specific notification routine associated with the probe. If non- NULL , the notification routine will be invoked on each occurrence of the associated event. If NULL , no invocation is performed.
The data for the MonActorProbe structure, for the MonActorVtbl structure, and the code for the monitoring routines must belong to supervisor space and must be locked in physical memory. The notification routines are executed in supervisor execution mode. Except where explicitly stated, they must not to re-enter the microkernel except via a few permitted system calls.
void connection (probe, state) MonActorProbe* probe; MonActorState* state;
The connection() routine is invoked after the probe has been connected to an actor. The probe parameter is a pointer to the connected probe (passed as an argument to the svActorProbeConnect(2MON) microkernel call). The state parameter is a pointer to a MonActorState structure, which represents the actor internally within the microkernel address space (see svActorMonConst(2MON) ). This pointer is valid for the lifetime of the actor.
void disconnection (probe) MonActorProbe* probe;
The disconnection() routine is invoked after a probe has been disconnected from an actor. The probe parameter is a pointer to the probe involved.
void deletion (probe) MonActorProbe* probe;
The deletion() routine is invoked after the actor has been deleted. The probe parameter is a pointer to the actor's probe.
int nextThread (probe, state) MonActorProbe* probe; MonThreadState* state;
The nextThread() routine is invoked as a consequence of the threadStat(2K) microkernel call. There is one invocation of nextThread() for each thread of the actor. The probe parameter points to the probe of the actor whose threads are being listed. The state parameter is a pointer to a MonThreadStat structure; this is the internal representation of the thread's state within the microkernel address space. This pointer is valid for the lifetime of the thread and is guaranteed to remain valid while the notification routine is being executed. Finally, nextThread() is invoked a last time with a null state parameter to indicate that all threads have been processed.
int nextPort (probe, state) MonActorProbe* probe; MonPortState* state;
The nextPort() routine is invoked as a consequence of the svActorPortList(2MON) microkernel call. There is one invocation of nextPort() for each port of the actor. The probe parameter points to the probe of the actor whose ports are being listed. The state parameter is a pointer to a MonPortStat structure; this is the internal representation of the port's state within the microkernel address space. This pointer is valid for the lifetime of the port and is guaranteed to remain valid while the notification routine is being executed. Finally, nextPort() is invoked a last time with a null state parameter to indicate that all ports have been processed.
Upon successful completion, both microkernel calls return 0 . Otherwise, a negative error code is returned.
An attempt was made to connect a probe while another probe was already connected to the actor.
An attempt was made to disconnect a probe which was not connected to the actor.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
svActorProbeConnect(2MON) , svThreadProbeConnect(2MON) , svPortProbeConnect(2MON) , svActorMonConst(2MON)
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | PARAMETERS | EXTENDED DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO