// IfsMiscRes.bcpl - Miscellaneous server - RESIDENT
// Copyright Xerox Corporation 1979, 1980
// Last modified December 12, 1980  5:44 PM by Boggs

get "Pup0.decl"
get "Pup1.decl"

external
[
// outgoing procedures
MiscellaneousEvent

// incoming procedures
HandleMiscellaneousPup; HandleEchoPup
QueueEvent

// incoming statics
socEcho; socMiscellaneous; ctxMiscellaneousCtx
]

//---------------------------------------------------------------------------
let MiscellaneousEvent(ecb) be
//---------------------------------------------------------------------------
//If the miscellaneous services context is not active, check the miscellaneous
// services socket input queue for Pups every 100 ms.
[
while ctxMiscellaneousCtx eq 0 & socMiscellaneous>>PupSoc.iQ.head ne 0 do
   HandleMiscellaneousPup(socMiscellaneous>>PupSoc.iQ.head)

if socEcho>>PupSoc.iQ.head ne 0 then HandleEchoPup()

QueueEvent(ecb, 10)
]