Back to index

glibc  2.9
Defines
getsysstats.c File Reference
#include <sysdeps/unix/sysv/linux/getsysstats.c>

Go to the source code of this file.

Defines

#define GET_NPROCS_PARSER(FP, BUFFER, RESULT)

Define Documentation

#define GET_NPROCS_PARSER (   FP,
  BUFFER,
  RESULT 
)
Value:
do                                                               \
    {                                                            \
      (RESULT) = 0;                                              \
      /* Read all lines and count the lines starting with the string    \
        "cpu model".  We don't have to fear extremely long lines since         \
        the kernel will not generate them.  8192 bytes are really       \
        enough.  */                                              \
      while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL)      \
       if (strncmp (BUFFER, "cpu model", 9) == 0)                       \
         ++(RESULT);                                             \
    }                                                            \
  while (0)

Definition at line 22 of file getsysstats.c.