anchor.diff:    (let ((read (find :evfilt-read events :key #'kevent/filter)))
       (and read
   	 (find :ev-eof (kevent/flags read)))))
  +
  +;; KEVENT STRUCTS
  +#+darwin
  +(defun parse-kevent-struct (kevent-struct-ptr)
  +  (cffi:with-foreign-slots ((ident filter flags fflags data udata ext) kevent-struct-ptr (:struct kevent64-s))
  +    (list ident
  +	  (cffi:foreign-enum-keyword 'kevent-filters filter)
  +	  (remove-if #'(lambda (keyword)
  +			 (zerop (logand flags (cffi:foreign-enum-value 'kevent-flags keyword))))
  +		     (cffi:foreign-enum-keyword-list 'kevent-flags))
  +	  fflags
  +	  data 
  +	  udata
  +	  (list (cffi:mem-aref ext :uint64 0)
  +		(cffi:mem-aref ext :uint64 1)))))
  +
  +#+darwin
  +(defun prepare-kevent-struct (change kevent-struct-ptr)
  +  (cffi:with-foreign-slots ((ident filter flags fflags data udata ext) kevent-struct-ptr (:struct kevent64-s))
  +    (destructuring-bind (change-ident change-filter change-flags) change
  +      (setf ident change-ident
  +	    filter (cffi:foreign-enum-value 'kevent-filters change-filter)
  +	    flags (cffi:foreign-enum-value 'kevent-flags change-flags)
  +	    fflags 0
  +	    data 0
  +	    udata 0)
  +
  +      (setf (cffi:mem-aref ext :uint64 0) 0
  +	    (cffi:mem-aref ext :uint64 1) 0))))
  
positive.code: 				    :collect
  				    (parse-kevent-struct (cffi:mem-aptr event-list-ptr kevent-struct index)))))))))
  
  (defun parse-kevent-struct (kevent-struct-ptr)
    (cffi:with-foreign-slots ((ident filter flags fflags data udata ext) kevent-struct-ptr (:struct kevent64-s))
      (list ident
  	  (cffi:foreign-enum-keyword 'kevent-filters filter)
  	  (remove-if #'(lambda (keyword)
  			 (zerop (logand flags (cffi:foreign-enum-value 'kevent-flags keyword))))
  		     (cffi:foreign-enum-keyword-list 'kevent-flags))
  	  fflags
  	  data 
  	  udata
  	  (list (cffi:mem-aref ext :uint64 0)
  		(cffi:mem-aref ext :uint64 1)))))
  
  (defun process-kqueue-events (poller events)
    (let* ((unique-file-descriptors (remove-duplicates (mapcar #'first events) :test #'=))
  	 (unique-sockets (mapcar #'(lambda (fd)
  
negative.code: (in-package "BASIC-BINARY-IPC")
  
  (defparameter *kevent-struct* 
    #+darwin '(:struct kevent64-s)
    #-darwin (error "Unsupported platform for KQUEUE."))
  
  (defgeneric kqueue-descriptor (kqueue-poller)
    (:documentation "The OS descriptor for the KQUEUE."))
  