RSC/MP 7.2 Programming Manual
API Function Descriptions
HP NonStop Remote Server Call (RSC/MP) Programming Manual—522360-004
10-22
RscNotifySem [RSCSEM]
Remarks
Before calling RscNotifySem:
•
Create a connection handle by calling the RscConnect function.
•
Create a session handle by calling the RscBeginSession function.
•
Create a semaphore by using facilities provided by the operating system (see your 
operating system programming environment documentation for information about 
semaphore creation, use, and management). 
Then, call RscNotifySem according to your application’s needs:
•
To receive notification of nowaited RscWriteRead completions, call RscNotifySem 
once with uType set to RSC_NOTIFY_IO before calling RscWriteRead for the first 
time. This approach causes RSC/MP to signal your semaphore once for each 
subsequent nowaited RscWriteRead completion, until the session ends.
•
To receive notification of UMS messages, call RscNotifySem once with uType set 
to RSC_NOTIFY_UMS. This causes RSC/MP to signal your semaphore once for 
each subsequent UMS message received for the session, until the session ends.
You might choose to combine these methods in order to receive notifications of both 
types, by calling RscNotifySem twice. In this case, your application should either 
supply separate semaphores for I/O and UMS notifications (and then call either 
RscIoCheck or RscUmsCheck according to which semaphore is signaled), or supply a 
single common semaphore for both (and then call both RscIoCheck and 
RscUmsCheck when that semaphore is signaled).
Because a semaphore, when signaled, does not identify a specific nowaited I/O 
handle, an application should generally supply an I/O handle of RSC_IO_CHECK_ALL 
when calling RscIoCheck after receiving a notification.
If an application uses multiple concurrent RSC/MP sessions, you must plan your 
semaphore notifications carefully. A semaphore, when signaled, does not identify the 
connection or session handle against which an I/O operation completed. Therefore, 
your application should either use a separate semaphore for each session (and then 
call RscIoCheck only once, supplying the connection and session handles associated 
with the particular semaphore that was signaled), or share a single semaphore among 
multiple sessions (and call RscIoCheck repeatedly, with all possible connection and 
session handles, whenever the shared semaphore is signaled). The same guideline 
applies for UMS notifications.
If your semaphore’s signal count reaches its maximum, RSC/MP queues notifications 
internally, and repeatedly attempts to signal the semaphore until all notifications have 
been delivered.










