#include <sicstus/sicstus.h> int SP_load_sicstus_run_time(SP_get_dispatch_type **pfuncp, void *reserved);
SP_get_dispatch()function of the newly loaded SICStus runtime is stored at this address.
Positive if a new runtime could be loaded, non-positive on error. Please note: The return value was incorrectly described prior to SICStus Prolog 4.0.5. Also note that, for historical reasons, the meaning of the return value is different from the convention used by most of the SICStus Prolog C API.
SP_load_sicstus_run_time() loads a new SICStus runtime.
As a special case, if
SP_load_sicstus_run_time() is called from a
SICStus runtime that has not been initialized (with
SP_initialize()) and that has not previously been loaded as the
result of calling
SP_load_sicstus_run_time(), no new runtime
is loaded. Instead, the
SP_get_dispatch() of the runtime itself is
returned. In particular, the first time
is called on the initial SICStus runtime, and if this happens before
the initial SICStus runtime is initialized, no new runtime is
SP_load_sicstus_run_time() from a particular runtime can
be done from any thread.
An application that links statically with the SICStus runtime should
You should not use pre-linked foreign resources when using multiple SICStus runtimes in the same process.
For an example of loading and using multiple SICStus runtimes, see library/jasper/spnative.c that implements this functionality for the Java interface Jasper.
Multiple SICStus Runtimes.