FTAM/9000 Programmer's Guide

Chapter 4 175
Using Support Functions
Responding to Asynchronous Calls
Responding to Asynchronous Calls
The MAP 3.0 Event Management interface plays a central role in your
use of asynchronous calls to FTAM functions.
It is common to have multiple asynchronous function calls outstanding.
As responses to these calls come in, the FTAM Service Provider Process
(SPP) queues them. The Event Management interface takes the first
response off this queue and returns it to the caller as a MAP 3.0 event.
At the same time, the Event Management interface updates the called
function's inout DCB to show the outcome of the asynchronous call.
The FTAM/9000 implementation of MAP 3.0 Event Management
consists of three functions, each used under slightly different
circumstances. The functions are:
em_wait()
em_hp_select()
em_hp_sigio()
Whenever possible, use only em_wait() to wait for and obtain MAP
events. Since em_wait() is the only one of the three defined by the MAP
3.0 specification, using it eases porting to non-HP platforms. However,
em_wait() is also very limited. Sometimes, you may have no alternative
but to use one or both proprietary functions instead of or in addition to
em_wait().
Following are some guidelines for each of the three event management
functions.
When to Use em_wait()
The em_wait() function enables you to suspend application processing
until a MAP event occurs. However, em_wait() does not provide for
waiting on any non-MAP events.
Use em_wait() when your application needs to wait exclusively on MAP
3.0 events. For example, if your application is a daemon process which
interacts only with the OSI network via FTAM protocols.