Search code examples
clinux-kernelminix

Meaning of public modificator for function in C


PUBLIC void main

This is from kernel.c from Minix source. What is the meaning of PUBLIC in this case?


Solution

  • It's probably defined like this:

    #define PUBLIC extern
    #define PRIVATE static
    

    Ooops, just looked in my copy of Tanenbaum. It is defined as:

    #define PUBLIC
    

    i.e. as nothing. It's simply a bit of "self-documentation". PRIVATE is defined as I originally said. You can find these in the Minix source file const.h.