NAME | SYNOPSIS | FEATURES | DESCRIPTION | DESCRIPTION OF THE NOTIFICATION ROUTINES | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO
#include <mon/chMon.h>int svActorProbeConnect(KnCap * cap, MonActorProbe * probe);
MON
The svActorProbeConnect and svActorProbeDisconnect kernel 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 kernel.
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 (this is described later on in this manual page). 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 kernel except via a few permitted system calls (see svIntrConnect(2K)).
The notification routines are the following:
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 kernel call). The state parameter is a pointer to a MonActorState structure, which represents the actor internally within the kernel 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) kernel 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 kernel address space. This pointer is valid for the lifetime of the thread and is guarantee d 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 portList (2K) kernel 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 kernel 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 kernel 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) , svIntrConnect(2K)
NAME | SYNOPSIS | FEATURES | DESCRIPTION | DESCRIPTION OF THE NOTIFICATION ROUTINES | RETURN VALUE | ERRORS | ATTRIBUTES | SEE ALSO