EC2_$WAIT_SLOW_IO Domain/OS EC2_$WAIT_SLOW_IO
NAME
ec2_$wait_slow_io - wait for an eventcount trigger during I/O
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/ec2.h>
pinteger ec2_$wait_slow_io(
ec2_$ptr_t *ec_plist,
long *ec_vlist,
short &ec_count,
status_$t *status)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/ec2.ins.pas';
function ec2_$wait_slow_io(
in ec_plist: univ ec2_$ptr_list_t;
in ec_vlist: univ ec2_$val_list_t;
ec_count: integer;
out status: status_$t): pinteger;
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/ec2.ins.ftn'
integer*4 ec_plist(128), ec_vlist(128), status
integer*2 ec_satisfied, ec_count
ec_satisfied = ec2_$wait_slow_io(ec_plist, ec_vlist, ec_count, status)
DESCRIPTION
Ec2_$wait_slow_io is mostly for use in type manager programs.
Ec2_$wait_slow_io waits until one of the eventcounts in the ec_plist
reaches its trigger value in the ec_vlist. When an eventcount reaches
its trigger value, ec2_$wait_slow_io returns the position in ec_plist of
the pointer to the eventcount that is satisfied. If the first eventcount
in ec_plist is satisfied, ec2_$wait_slow_io returns 1; if the last
eventcount is satisfied, ec2_$wait_slow_io returns ec_count.
Several eventcounts may have been satisfied by the time this call
returns. The value returned is the position of the eventcount with the
smallest subscript that is satisfied.
If the calling process has disabled asynchronous faults and one is
received while the process is waiting in a call to ec2_$wait_slow_io,
then ec2_$wait_slow_io returns with ec2_$wait_quit in status.
ec_plist
An array of pointers to eventcounts. The total number of pointers
in ec_plist on any one node cannot exceed 128. The pointers in
ec_plist for system eventcounts are returned by the get_ec calls for
the manager of the eventcounts.
ec_vlist
An array of positive trigger values for each of the eventcounts in
ec_plist. Ec2_$wait returns when any of the eventcounts from
ec_plist reaches its trigger value in ec_vlist.
ec_count
Number of eventcount pointers in ec_plist.
status
The completion status.
NOTES
The difference between ec2_$wait_slow_io and ec2_$wait or ec2_$wait_svc
is in how they respond to asynchronous faults. In general,
ec2_$wait_slow_io behaves like ec2_$wait_svc except that it recognizes
whether a signal has been designated to terminate active I/O via the
sigvec system call of BSD. If the signal handler is established using
SysV calls, then ec2_$wait_slow_io responds just like ec2_$wait_svc.
If the calling process has disabled asynchronous faults and one is
received during a call to ec2_$wait_slow_io, then ec2_$wait_slow_io
returns with ec2_$wait_quit in status - just like ec2_$wait_svc. If
asynchronous faults are enabled and one is received during a call to
ec2_$wait_slow_io, then ec2_$wait_slow_io responds in the following way:
⊕ It calls the clean-up handler, if the calling process has one.
⊕ If the calling process lacks a clean-up handler but has a fault
handler, then ec2_$wait_slow_io calls the fault handler. If the
fault handler returns, ec2_$wait_slow_io restarts any I/O inter-
rupted by the signal unless the SV_INTERRUPT flag was set via the
sigvec system call of BSD, and continues waiting (like
ec2_$wait). If the SV_INTERRUPT flag was set for the fault, via
the sigvec call of BSD, ec2_$wait_slow_io returns to the calling
process with ec2_$wait_quit in status (like ec2_$wait_svc).
⊕ If the calling process has neither a clean-up handler nor a fault
handler, the system aborts the calling process.
SEE ALSO
gpr_$get_ec, ios_$get_ec, ipc_$get_ec, mbx_$get_ec, pbu_$get_ec,
pfm_$enable, pfm_$inhibit,
pgm_$get_ec, time_$get_ec, BSD sigvec(3).