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 GET_NPROCS_CONF_PARSER(FP, BUFFER, RESULT)

Define Documentation

#define GET_NPROCS_CONF_PARSER (   FP,
  BUFFER,
  RESULT 
)
Value:
do                                                                \
    {                                                             \
      /* Find the line that contains the information about the number of   \
        probed cpus.  We don't have to fear extremely long lines since          \
        the kernel will not generate them.  8192 bytes are really enough. \
        If there is no "CPUs ..." line then we are on a UP system.  */          \
      (RESULT) = 1;                                               \
      while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL)          \
       if ((sscanf (buffer, "cpus detected : %d", &(RESULT)) == 1)       \
           || (sscanf (buffer, "CPUs probed %d", &(RESULT)) == 1))       \
         break;                                                   \
    }                                                             \
  while (0)

Definition at line 39 of file getsysstats.c.

#define GET_NPROCS_PARSER (   FP,
  BUFFER,
  RESULT 
)
Value:
do                                                                \
    {                                                             \
      /* Find the line that contains the information about the number of   \
        active cpus.  We don't have to fear extremely long lines since          \
        the kernel will not generate them.  8192 bytes are really enough. \
        If there is no "CPUs ..." line then we are on a UP system.  */          \
      (RESULT) = 1;                                               \
      while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL)       \
       if ((sscanf (BUFFER, "cpus active : %d", &(RESULT)) == 1)         \
           || (sscanf (BUFFER, "CPUs probed %*d active %d",              \
                     &(RESULT)) == 1))                            \
         break;                                                   \
    }                                                             \
  while (0)

Definition at line 23 of file getsysstats.c.