next up previous
Next: C Code Wrappers Up: Recent Developments Previous: BLAS

Shared Libraries

The ability to dynamically load code has been available since the first release but with some annoying differences between platforms and some inefficiencies. In the interim, shared libraries have become a part of all major operating systems. The dynamic loading mechanism is therefore being revised to use shared libraries and present a unified interface across platforms.

The new shared library mechanism consists of a low level and an intermediate level. The low level is based on the System VR4 dlopen, dlsym and dlclose interface. This interface is emulated on systems where it is not natively supported. Function pointers retrieved by dlsym can either use a calling convention in which they take pointer arguments and return a pointer value, or they can use the calling convention of the internal XLISP functions. This level allows the original foreign function calling mechanism to be emulated.

The intermediate level adds a simple versioning system, a mechanism for initializing constants and associating internal functions with symbols. The internal functions are assumed to use the internal XLISP calling convention. A reflection mechanism for examining library contents is also provided. This combination provides rudimentary support for a shared module system.


next up previous
Next: C Code Wrappers Up: Recent Developments Previous: BLAS
Luke Tierney
5/27/1998