rpc_ss_get_thread_handle(3rpc)Gets a thread handle for the manager code before it spawns additional threads, or for the client code when it becomes a server Used by server or possibly by client applications. Synopsis
#include <dce/rpc.h> rpc_ss_thread_handle_t rpc_ss_get_thread_handle(void);
Description The rpc_ss_get_thread_handle( ) routine can also be used when a program changes from being a client to being a server. The program gets a handle on its environment as a client by calling rpc_ss_get_thread_handle( ). When the program reverts to being a client it re-establishes the client environment by calling rpc_ss_set_thread_handle( ), supplying the previously obtained handle as a parameter.
Return Values
Examples
#include <pthread.h> pthread_t Launch_thread( int (*routine_to_launch)( pthread_addr_t th ) ) { rpc_ss_thread_handle_t th = rpc_ss_get_thread_handle( ); pthread_t t; /* * Create the thread and pass to it the thread handle * so it can use rpc_ss_set_thread_handle. */ pthread_create (&t, pthread_attr_default, (pthread_startroutine_t)routine_to_launch, (pthread_addr_t)th); return t; } Errors A representative list of errors that might be returned is not shown here. Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages.
Related Information rpc_ss_set_thread_handle(3rpc)
|