Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/posix/stdlib.c

    r0d33863 r11544f4  
    4949#include "libc/str.h"
    5050#include "libc/vfs/vfs.h"
    51 #include "libc/stats.h"
    5251
    5352/**
     
    474473 * Get system load average statistics.
    475474 *
     475 * Not supported. Always returns -1.
     476 *
    476477 * @param loadavg Array where the load averages shall be placed.
    477478 * @param nelem Maximum number of elements to be placed into the array.
     
    480481int bsd_getloadavg(double loadavg[], int nelem)
    481482{
    482         assert(nelem > 0);
    483        
    484         size_t count;
    485         load_t *loads = stats_get_load(&count);
    486        
    487         if (loads == NULL) {
    488                 return -1;
    489         }
    490        
    491         if (((size_t) nelem) < count) {
    492                 count = nelem;
    493         }
    494        
    495         for (size_t i = 0; i < count; ++i) {
    496                 loadavg[i] = (double) loads[i];
    497         }
    498        
    499         free(loads);
    500         return count;
     483        return -1;
    501484}
    502485
Note: See TracChangeset for help on using the changeset viewer.