RSC/MP Programming Manual
API Function Descriptions
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.
USHORT RscRegisterThread (VOID);
Return Value
The return va lue is zero if the function is successful; otherwise, the function returns
one of these result va lues:
RSC_INSUFFICIENT_RESOURCES
75
RSC_PICCOLO_FAILURE
85
RSC_ALREADY_REGISTERED
87
RSC_NOT_IMPLEMENTED
103
See the Remote Server Call (RSC/MP) Messages Manual for a description of these
errors.
Remarks
This function is supported under Windows, Solaris, HP-UX, AIX and Linux. However,
some thread limitations exist for Solaris, HP-UX, AIX and Linux 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.
HP NonStop Remote Server Call (RSC/MP) Programming Manual — 522360-006
10 - 29