Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ rpc_sm_get_thread_handle(3rpc) — DCE 3.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

rpc_sm_get_thread_handle(3rpc)  —  Subroutines

NAME

rpc_sm_get_thread_handle — Gets a thread handle for the stub memory management environment

Synopsis

rpc_ss_thread_handle_t rpc_sm_get_thread_handle(
unsigned32 ∗status);

Parameters

Output

statusReturns the status code from this routine.  This status code indicates whether the routine completed successfully or, if not, why not. 

Description

Applications call rpc_sm_get_thread_handle() to get a thread handle for the current stub memory management environment.  A thread that is managing memory within the stub memory managment scheme calls pc_sm_get_thread_handle() to get a thread handle for its current stub memory management environment.  A thread that calls rpc_sm_set_thread_handle() with this handle, is able to use the same memory management environment. 

When multiple threads call rpc_sm_allocate() and rpc_sm_free() to manage the same memory, they must share the same thread handle.  The thread that established the stub memory management environment calls rpc_sm_get_thread_handle() to get a thread handle before spawning new threads that will manage the same memory.  The spawned threads then call rpc_sm_set_thread_handle() with the handle provided by the parent thread. 

Note:

Typically, rpc_sm_get_thread_handle() is called by a server manager routine before it spawns additional threads.  Normally the stub sets up the memory management environment for the manager routine.  The manager calls rpc_sm_get_thread_handle() to make this environment available to the spawned threads. 

A thread may also use rpc_sm_get_thread_handle() and rpc_sm_set_thread_handle() to save and restore its memory management environment. 

Return Values

A thread handle. 

Errors

The following describes a partial list of errors that might be returned.  Refer to the OSF DCE Problem Determination Guide for complete descriptions of all error messages. 

rpc_s_ok
Success.

Related Information

Functions: rpc_sm_allocate(3rpc), rpc_sm_free(3rpc), rpc_sm_set_thread_handle(3rpc. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026