NXVmExit

Terminates the containing virtual machine.

Library:LibC
Classification:NKS
Service:NKS Virtual Machine

Syntax

  #include <nks/vm.h>
   
  void NXVmExit (
     int   status);   
  

Remarks

NXVmExit terminates the containing virtual machine. As part of that termination, all system resources allocated to the virtual machine are freed.

NOTE:If the application state is distributed across multiple virtual machines, it is the responsibility of the application to clean up its state before calling NXVmExit.

Calling NXVmExit has the same effect as calling NXThreadExit from the last application thread in the virtual machine.

When the VM exits, NKS tears it down cleanly by closing down all its open files, invoking all key-value pair destructors and executing any registered error handler.

If the VM was spawned by another NKS program and that program calls NXVmJoin, status can become known.

See Also