RSC/MP 7.2 Programming Manual
Application Design
HP NonStop Remote Server Call (RSC/MP) Programming Manual—522360-004
5-4
Asynchronous I/O Completion Notification
To allow the server to respond in any order to multiple, outstanding, nowaited
RscWriteRead function calls, add the SETMODE_30 option (with a nonzero value) to
the RSC.INI file, or use RscSetOption in the application program to set this option.
When the TDP opens a server using the RSC_ST_INTERPROCESS session type, it
sends a SETMODE 30 call to the server, with the param1 value set to 1. This call
completes nowait I/O operations in any order, except that if more than one operation is
ready to finish at the time of the AWAITIO[X] call, the TDP completes these operations
in the order requested. For a description of SETMODE 30, see the Guardian
Procedure Calls Reference Manual.
Asynchronous I/O Completion Notification
RSC/MP offers platform-specific asynchronous notification of I/O completions on all
platforms. Use this feature to eliminate the need for polling for nowaited I/O completion
or when determining whether an unsolicited message (UMS) has been received.
RSC/MP offers several methods of requesting I/O completion notification:
•
Semaphores — Semaphore notification is available on UNIX and Windows
systems with the RscNotifySem function. Use this function to identify a semaphore
created by the application that will be signaled by RSC/MP when a nowaited I/O
completes or when a UMS message is received.
•
Windows messages — Windows message notification is available on Windows
systems with the RscNotifyWin function. Use this function to specify a Windows
message that will be queued to a specified window handle by RSC/MP when a
nowaited I/O completes or when a UMS message is received. Certain limitations
apply when RSC/MP is installed as a service; see RscNotifyWin [RSCNOT] on
page 10-26.
•
Thread-queued messages — Thread-queued messages are available on Windows
systems with the RscNotifyThread function. Use this function to specify a Windows
message that will be queued to a specified thread ID when a nowaited I/O
completes or when a UMS message is received. Each message carries two 32-bit
parameters that are used to convey the connection handle and session handle
associated with the completed operation. By using thread-queued messages with
connection and session handles, an RSC/MP application can cleanly and
efficiently await and distinguish completions of concurrent requests on many
sessions. Certain limitations apply when RSC/MP is installed as a service; see
RscNotifyThread [RSCNOTH] on page 10-23.
When notifications are used for I/O completions, the specific handle of the completed
I/O operation is not conveyed by the notification. When processing an I/O completion
notification, the application should supply RSC_IO_CHECK_ALL as the handle to
RscIoCheck.