PreviousNext

rpc_mgmt_set_server_stack_size(3rpc)

Specifies the stack size for each server thread

Used by server applications.

Synopsis

#include <dce/rpc.h>

void rpc_mgmt_set_server_stack_size(

unsigned32 thread_stack_size,

unsigned32 *status);

Parameters

Input

thread_stack_size
Specifies, in bytes, the stack size allocated for each thread created by rpc_server_listen( ). This value is applied to all threads created for the server. Select this value based on the stack requirements of the remote procedures offered by the server.

Output

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

Description
The rpc_mgmt_set_server_stack_size( ) routine specifies the thread stack size to use when the RPC runtime creates call threads for executing remote procedure calls. The max_calls_exec parameter in rpc_server_listen( ) specifies the number of call execution threads created.

A server, provided it knows the stack requirements of all the manager routines in the interfaces it offers, can call rpc_mgmt_set_server_stack_size( ) to ensure that each call thread has the necessary stack size.

This routine is optional. When it is used, it must be called before the server calls rpc_server_listen( ). If a server does not call this routine, the default per thread stack size from the underlying threads package is used.

Some thread packages do not support the specification or modification of thread stack sizes. The packages cannot perform such operations or the concept of a thread stack size is meaningless to them.

Return Values
No value is returned.

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.

rpc_s_invalid_arg
Invalid argument.

rpc_s_not_supported
Not supported.

Related Information
Functions: rpc_server_listen(3rpc)