sbcl.sbcl/src/runtime/main.c
Charles Zhang 8fd2eae7f5 Define a foreign callable interface and make libsbcl.so useful.
This change adds many things:
* There is now a proper interface to defining and using foreign
callbacks in Lisp.
* There is now a usable script to build
libsbcl.so ("make-shared-library.sh"), which also slightly adjusts the
runtime to make it more amenable for external use with respect to
signalling.
* There is now a way to use libsbcl.so in conjunction with other
object code to actually initialize Lisp and call Lisp foreign
callables from C directly. (this works, at least on Linux, but support
is not quite complete yet, because we don't have a way to
de-initialize Lisp)
* `save-lisp-and-die' has gained a new argument to support the above.

I guess technically DEFINE-ALIEN-CALLBACK can be removed, since the
DEFINE-ALIEN-CALLABLE interface now supersedes it, but internal stuff
like tests still use it, so that change can wait for now.
2021-09-27 15:25:13 -07:00

10 lines
256 B
C

#include <interr.h>
int main(int argc, char *argv[], char *envp[])
{
extern int initialize_lisp(int argc, char *argv[], char *envp[]);
initialize_lisp(argc, argv, envp);
lose("unexpected return from initial thread in main()");
return 0;
}