NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | PARAMETERS | EXTENDED DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO
#include <mon/chMon.h>int svPortProbeConnect(KnCap * actorcap, KnPortLid portli, MonPortProbe * 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 svPortProbeConnect() and svPortProbeDisconnect() functions respectively connect and disconnect a monitoring probe to and from a port. The portli parameter is the local identifier of the target port. The actorcap parameter is a pointer to the capability of the target port's actor.
The probe parameter describes the monitoring probe. It is a pointer to a MonPortProbe structure whose member is the following:
MonPortVtbl* vtbl;
The vtbl member specifies the notification routines associated with the probe. It is a pointer to a MonPortVtbl structure whose members are the following:
int vtbl_sizeof; Port_connection connection; Port_disconnection disconnection; Port_deletion deletion;
The vtbl_sizeof member must be set to sizeof(MonPortVtbl) . It is provided for compatibility between different releases of the microkernel.
The other members of the MonPortVtbl 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 done.
The data for the MonPortProbe structure, for the MonPortVtbl 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 such as interruptions.
void connection (probe, portstate) MonPortProbe* probe; MonPortState* portstate;
The connection() routine is invoked after the probe has been connected to a port. The probe parameter is a pointer to the connected probe (passed as an argument to the svPortProbeConnect() microkernel call). The state parameter is a pointer to a MonPortState structure, which represents the actor internally within the microkernel address space (see svPortMonConst(2MON) ). This pointer is valid for the lifetime of the port.
void disconnection (probe) MonPortProbe* probe;
The disconnection() routine is invoked after a probe has been disconnected from a port. The probe parameter is a pointer to the probe concerned.
void deletion (probe) MonPortProbe* probe;
The deletion() routine is invoked after the actor has been deleted. The probe parameter is a pointer to the port's probe.
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 port.
An attempt was made to disconnect a probe which was not connected to the port.
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
---|---|
Interface Stability | Evolving |
svSiteProbeConnect(2MON) , svActorProbeConnect(2MON) , svThreadProbeConnect(2MON) , svPortMonConst(2MON)
NAME | SYNOPSIS | API RESTRICTIONS | FEATURES | DESCRIPTION | PARAMETERS | EXTENDED DESCRIPTION | RETURN VALUES | ERRORS | ATTRIBUTES | SEE ALSO