On Sun, May 10, 2009 at 9:37 PM, Benjamin Tovar mugrido@gmail.com wrote:
Now, everything works nicely, unless I use threads in C (pthreads). With threads, the first time I call (*callback)()); it segfaults, as if the pointer to the function was not valid (it does get assigned). I have no clue of what is going on, since it seems that the threads are not sharing the information to the function pointer. What I am missing here? I have tried with both Allegro and SBCL, on a Debian "testing".
IIUC, you may only call back into Lisp within a thread that has a Lisp stack. So, you can't invoke those callbacks from threads created in C.