Execute on another VP

If the VP environment is not useful for the execution of your C function, you can tell the routine manager to switch its execution to another VP with the mi_call_on_vp() function.

Pass the following arguments to this function:
  • The VP identifier of the VP on which to execute the C function
  • A pointer to the return value of the function
  • The address of the C function to execute
  • The number of arguments to the C function
  • Any arguments that the C function needs to execute

The mi_call_on_vp() function switches the current thread to the specified VP and executes the C function on this VP. When the C function completes, mi_call_on_vp() stores as one of its arguments the C-function return value and returns control to the originating VP.