__xhotu()

Purpose

This function is used to run a function in a persistent C environment. The function is also available under the name EDCXHOTU.

This routine, and the C function being called, must use OS linkage. As a result, you cannot make direct use of z/OS® XL C/C++ Library functions with this function. C functions being invoked using __xhotu() must be compiled with #pragma linkage(func_name,OS).

__xhotu() is specific to SP C. It is part of the group serving the persistent C environment.

For an extensive example of the use of __xhotu(), see Creating and using persistent C environments.

Format

#include <spc.h>

void *__xhotu(void *handle, void *function, …);
The parameters are fullwords (four bytes):
handle
a handle—returned by __xhotc() or __xhotl()
function
a function pointer, which points to the desired C function
  • First parameter to pass to the function
  • Second parameter to pass to the function

Returned value

The returned value from __xhotu() is the returned value from the function run in the persistent C environment.