RSC/MP 7.2 Programming Manual
API Function Descriptions
HP NonStop Remote Server Call (RSC/MP) Programming Manual—522360-004
10-29
RscRegisterThread [RSCRTHD]
RscRegisterThread [RSCRTHD]
The RscRegisterThread function allows multiple threads to call the RSC/MP API library 
simultaneously. Call this function before any thread (except the main thread) calls an 
RSC/MP function. Calling this function allows the RSC/MP library to create the 
necessary context to keep this thread’s operations within the library discrete from other 
threads. 
If the RscRegisterThread function is not called first, the thread shares contextual 
information with the main thread and other unregistered threads. Data validity and 
operations cannot be guaranteed for an unregistered thread, even though RSC/MP 
calls might appear to be operating correctly. The main execution thread maintains its 
own context by default and can always be considered to be registered. 
Return Value
The return value is zero if the function is successful; otherwise, the function returns 
one of these result values:
See the Remote Server Call (RSC/MP) Messages Manual for a description of these 
errors.
Remarks
This function is supported under Windows, Solaris, and HP-UX. However, some thread 
limitations exist for Solaris and HP-UX, which are UNIX-based operating systems. See 
Thread Limitations on UNIX-based Operating Systems
 on page 10-29 and the UNIX-
specific section of the RSC/MP Installation Guide for more information.
Thread Limitations on UNIX-based Operating Systems
The implementation of RSC/MP on UNIX-based operating systems uses one System V 
shared memory segment for each thread that calls RscRegisterThread successfully, 
plus one shared memory segment for the main thread. Limits to the number of shared 
memory segments allowed (and therefore the number of threads that can register with 
RSC/MP) are dictated by the operating system, and typically depend on system 
configuration settings. 
USHORT RscRegisterThread (VOID); 
RSC_INSUFFICIENT_RESOURCES 75
RSC_PICCOLO_FAILURE 85
RSC_ALREADY_REGISTERED 87
RSC_NOT_IMPLEMENTED 103










