anchor.diff:    "Shuts down SDL2."
     (in-main-thread ()
       (sdl-quit)
  -    (setf *main-thread-channel* nil)
       (setf *lisp-message-event* nil)))
   
   (defmacro with-init ((&rest sdl-init-flags) &body body)
  
positive.code:   (let ((thread (find 0 (ccl:all-processes) :key #'ccl:process-serial-number)))
      (ccl:process-interrupt thread (lambda ()
                                      (without-fp-traps (sdl-main-thread)))))
    #-(and ccl darwin)
    (bt:make-thread #'sdl-main-thread)
    (in-main-thread ()
      ;; HACK! glutInit on OSX uses some magic undocumented API to
      ;; correctly make the calling thread the primary thread. This
      ;; allows cl-sdl2 to actually work. Nothing else seemed to
  
negative.code: 
  (defun init (&rest sdl-init-flags)
    "Initialize SDL2 with the specified subsystems. Initializes everything by default."
    (unless *main-thread-channel*
      (setf *main-thread-channel* (make-channel))
      #-(and ccl darwin)
      (bt:make-thread #'sdl-main-thread))
    (unless *lisp-message-event*
      (setf *lisp-message-event* (sdl-register-events 1))
      (setf (c-ref *wakeup-event* sdl2-ffi:sdl-event :type) *lisp-message-event*))
  