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                                                              \
    {                                                           \
      (RESULT) = 0;                                             \
      /* 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.  */                                             \
      while (fgets_unlocked ((BUFFER), sizeof (BUFFER), (FP)) != NULL)        \
       if (sscanf (buffer, "ncpus probed : %d", &(RESULT)) == 1)       \
         break;                                                 \
    }                                                           \
  while (0)

Definition at line 38 of file getsysstats.c.

#define GET_NPROCS_PARSER (   FP,
  BUFFER,
  RESULT 
)
Value:
do                                                               \
    {                                                            \
      (RESULT) = 0;                                              \
      /* 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.  */                                              \
      while (fgets_unlocked (BUFFER, sizeof (BUFFER), FP) != NULL)      \
       if (sscanf (BUFFER, "ncpus active : %d", &(RESULT)) == 1)        \
         break;                                                  \
    }                                                            \
  while (0)

Definition at line 24 of file getsysstats.c.