12.3.53 SP_load_sicstus_run_time()

Synopsis

     #include <sicstus/sicstus.h>
     
     int
     SP_load_sicstus_run_time(SP_get_dispatch_type **pfuncp,
                              void *reserved);

Arguments

pfuncp
On success the address of the SP_get_dispatch() function of the newly loaded SICStus run-time is stored at this address.
reserved
Reserved, should be NULL.

Return Value

zero if a new run-time could not be loaded, non-zero otherwise.

Description

SP_load_sicstus_run_time() loads a new SICStus run-time.

As a special case, if SP_load_sicstus_run_time() is called from a SICStus run-time 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 run-time is loaded. Instead, the SP_get_dispatch() of the run-time itself is returned. In particular, the first time SP_load_sicstus_run_time() is called on the initial SICStus run-time, and if this happens before the initial SICStus run-time is initialized, no new run-time is loaded.

Calling SP_load_sicstus_run_time() from a particular run-time can be done from any thread.

An application that links statically with the SICStus run-time should not call SP_load_sicstus_run_time().

You should not use pre-linked foreign resources when using multiple SICStus run-times in the same process.

For an example of loading and using multiple SICStus run-times, see library/jasper/spnative.c that implements this functionality for the Java interface Jasper.

See Also

Multiple SICStus Run-Times.


Send feedback on this subject.