Ignore:
Timestamp:
Sep 12, 2004, 9:40:29 PM (21 years ago)
Author:
bird
Message:

Adding BSD stuff like there was no tomorrow.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/emx/include/InnoTekLIBC/sharedpm.h

    • Property cvs2svn:cvs-rev changed from 1.5 to 1.6
    r1504 r1505  
    298298
    299299/**
     300 * The structure contains the system load averages.
     301 */
     302typedef struct __libc_SPMLoadAvg
     303{
     304    /** Array of the three stamples.
     305     * The entries are for 1, 5 and 15 min averages respectively.
     306     *
     307     * The samples them selfs are stored as integers and not as a
     308     * double as the interface returns. The reason is that this is smaller
     309     * and it's what both BSD and Linux is doing. The fraction part is
     310     * the lower 11 bits (this is also identical to BSD and Linux).
     311     */
     312    uint32_t                    u32Samples[3];
     313    /** Timestamp of the last update. */
     314    unsigned                    uTimestamp;
     315} __LIBC_SPMLOADAVG;
     316/** Pointer to load averages. */
     317typedef __LIBC_SPMLOADAVG *__LIBC_PSPMLOADAVG;
     318
     319
     320/**
    300321 * This is the header of the LIBC shared memory.
    301322 */
     
    336357        char                    ach[16];
    337358    };
     359
     360    /** System Load Averages. */
     361    __LIBC_SPMLOADAVG           LoadAvg;
     362
    338363    /* The rest of the block, up to cbProcess, is undefined in this version.
    339364     * Future versions of LIBC may use this area assuming it's initalized with zeros.
     
    531556
    532557/**
     558 * Get the stored load average samples.
     559 *
     560 * @returns 0 on success.
     561 * @returns -1 and errno on failure.
     562 * @param   pLoadAvg    Where to store the load average samples.
     563 * @param   puTimestamp Where to store the current timestamp.
     564 */
     565int     __libc_spmGetLoadAvg(__LIBC_PSPMLOADAVG  pLoadAvg, unsigned *puTimestamp);
     566
     567/**
     568 * Get the stored load average samples.
     569 *
     570 * @returns 0 on success.
     571 * @returns -1 and errno on failure.
     572 * @param   pLoadAvg    Where to store the load average samples.
     573 */
     574int     __libc_spmSetLoadAvg(const __LIBC_SPMLOADAVG *pLoadAvg);
     575
     576/**
    533577 * Checks the SPM memory for trouble.
    534578 *
Note: See TracChangeset for help on using the changeset viewer.