Function names

Externally visible function names should be used rarely and have unique names. Currently we have several techniques for achieving this:

  1. #ifdefs in the header file
    When the V3 Hypervisor is compiled it defines the symbol __V3VEE__ Any function that is not needed outside the Hypervisor context should be inside an #ifdef __V3VEE__ block, this will make it invisible to the host environment.

  2. Static Functions
    Any utility functions that are only needed in the .c file where they are defined should be declared as static and not included in the header file. You should make an effort to use static functions whenever possible.

  3. v3_ prefix
    Major interface functions should be named with the prefix v3_ This allows easy understanding of how to interact with the subsystems. In the case that they need to be externally visible to the host OS, make them unlikely to collide with other functions.



Jack Lange 2010-04-13