The routine manager

After the query parser has used routine resolution to determine which UDR to invoke, the query executor calls the routine manager to handle the UDR execution.

The routine manager performs the following steps to execute the C UDR:
  1. For each UDR instance:
    1. Load the shared-object file that contains the object code for the UDR into shared memory.
    2. Allocate and initialize the routine sequence for the UDR.
  2. For each invocation of the UDR:
    1. Push the UDR argument values onto the thread stack.
    2. Dispatch the UDR to the appropriate virtual-processor class for execution.
    3. Save the return value of a user-defined function on the thread stack.
  3. At the end of the UDR instance, release the routine sequence.

The following sections briefly describe each of these steps. For a general discussion of the routine manager, see the Informix® User-Defined Routines and Data Types Developer's Guide.