From: Nikodemus S. <nik...@ra...> - 2011-11-24 09:50:49
|
On Thursday, 24 November 2011, Kouskoulas, Yanni A. < Yan...@jh...> wrote: > Is there any way I can read a more detailed explanation as to what the problem is calling a lisp thread from C? > What gives a thread a "lisp" flavor, and what gives a thread a "C" flavor? Is there a way I can help > implement an improvement to sbcl that would allow these callbacks without a work-around? I am > running sbcl on a Mac (i.e. Darwin kernel). All Lisp threads have "C-flavor", because they're (with the exeception of Windows) regular pthreads under the hood. Only the initial thread and threads created by a call to MAKE-THREAD have Lisp flavor, which mostly consists of being linked to list the GC uses to find all lisp threads, stack and tls storage set up the way we expect them, and a bunch of thread local special variable bindings. You can certainly help to implement such an improvement. First I would encourage you to read through MAKE-THREAD, and the C-side code it calls, and also have a look at how the initial thread is given it's lisp flavor. My understanding is that Anton's Windows fork does support callbacks from foreing threads, so might also take a look at how he does that. Then the think/hack/test cycle begins. ;) Cheers, -- nikodemus -- Cheers, -- Nikodemus |