The present invention provides systems and methods for dynamically linking
modules into a running operating system kernel. Systems and methods
described herein have the following advantages: (1) they permit an
application programmer to write, compile, execute, and terminate
application code that is to be loaded into a kernel as if the application
code was an ordinary application program, (2) they allow a standard
programming environment to be used to encapsulate application software in
a familiar environment, and (3) they permit automatic cleanup of errors
and freeing of program resources when the application terminates.