[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ff-interface



At  8:29 PM 5/5/93 -0600, Bill St. Clair wrote:
>[...]
>Conclusion, don't pass the addresses of any foreign functions to
>the MIDI manager from Lisp. Instead, call a foreign function to do it.
>Find out if the MIDI Manager initializes A5 for you before calling your
>interrupt-level callbacks.

One more important note. Do NOT callback to Lisp code at interrupt time.
Callbacks to DEFPASCAL or DEFCCCALLABLE functions must be strictly
synchronous (e.g. these callbacks may happen only from traps or foreign
functions that were called from Lisp code). Some of the MCL math code is
not reentrant. Worse, if the GC is running when you call back asynchronously,
the machine will crash. The only kosher way for interrupt routines to
communicate with Lisp code is via pointers or handles in the Mac Heap.