macros.lisp 525 B

123456789101112131415
  1. (in-package :hurd)
  2. (defmacro define-hurd-interface (what name params &body body)
  3. "Defines a new interface callback and then sets it on the routines table."
  4. (let ((callback-fun-name (intern
  5. (concatenate 'string "%lisp-"
  6. (symbol-name name))))
  7. (keyword-name (intern (string name) "KEYWORD")))
  8. `(progn
  9. (defcallback ,callback-fun-name err ,params
  10. ,@body)
  11. (setf (,what ,keyword-name) (callback ,callback-fun-name)))))