Back to index

lightning-sunbird  0.9+nobinonly
Functions | Variables
system.c File Reference
#include "prio.h"
#include "prmem.h"
#include "prprf.h"
#include "prsystem.h"
#include "plerror.h"

Go to the source code of this file.


static PRSysInfo Incr (PRSysInfo *cmd)
PRIntn main (PRIntn argc, char **argv)


static char * tag []

Function Documentation

static PRSysInfo Incr ( PRSysInfo cmd) [static]

Definition at line 53 of file system.c.

    PRIntn tmp = (PRIntn)*cmd + 1;
    *cmd = (PRSysInfo)tmp;
    return (PRSysInfo)tmp;
}  /* Incr */

Here is the caller graph for this function:

PRIntn main ( PRIntn  argc,
char **  argv 

Definition at line 60 of file system.c.

    PRStatus rv;
    PRSysInfo cmd;
    PRFileDesc *output = PR_GetSpecialFD(PR_StandardOutput);

    char *info = (char*)PR_Calloc(SYS_INFO_BUFFER_LENGTH, 1);
    for (cmd = PR_SI_HOSTNAME; cmd <= PR_SI_ARCHITECTURE; Incr(&cmd))
        rv = PR_GetSystemInfo(cmd, info, SYS_INFO_BUFFER_LENGTH);
        if (PR_SUCCESS == rv) PR_fprintf(output, "%s: %s\n", tag[cmd], info);
        else PL_FPrintError(output, tag[cmd]);

    PR_fprintf(output, "Host page size is %d\n", PR_GetPageSize());
    PR_fprintf(output, "Page shift is %d\n", PR_GetPageShift());
    PR_fprintf(output, "Number of processors is: %d\n", PR_GetNumberOfProcessors());
    PR_fprintf(output, "Physical memory size is: %llu\n", PR_GetPhysicalMemorySize());

    return 0;
}  /* main */

Here is the call graph for this function:

Variable Documentation

char* tag[] [static]
Initial value:

Definition at line 45 of file system.c.