There are three kinds of functions in DGD
A kfun is a function provided by DGD itself.
An afun is a function defined by the auto object, and can mask a kfun. Such masking is often done for security reasons and the kernel library’s auto object provides a good demonstration of this concept.
Any object, clone or master, may have LPC functions defined by the source that was used to compile it. Except for the initial cold boot for the driver and auto objects, any object can be compiled from literal source supplied to the compile_object kfun, but by default reads the source from the corresponding LPC source file.
DGD itself may call functions, called applies, which work like hooks.
Full documentation for DGD’s applies can be found in the lpc-doc package.
Functions can have attributes:
Technically, all calls to external objects from LPC are done by invoking the call_other kfun. Overriding this in the auto object will cause performance penalties, but may be useful. By default, attempting to call a nonexistent (and possibly invisible due to being static or private) function in any object returns nil. Kotaka overrides call_other to raise a runtime error if an attempt is made to call a non-existent function.
A callout is a delayed self-call, that must be directed at a static function in the object by invoking the call_out kfun.