1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85
|
#ifndef __kernel_h__
#define __kernel_h__
//
// NetBSD port:
// Copyright (c) 1995, 1996, 1997-2002 by Brian Grayson (bgrayson@netbsd.org)
//
// This file was written by Brian Grayson for the NetBSD and xosview
// projects.
// This file may be distributed under terms of the GPL or of the BSD
// license, whichever you choose. The full license notices are
// contained in the files COPYING.GPL and COPYING.BSD, which you
// should have received. If not, contact one of the xosview
// authors for a copy.
//
#include "defines.h"
void
BSDInit();
void
SetKernelName(const char* kernelName);
int
BSDGetCPUSpeed();
void
BSDPageInit();
void
BSDGetPageStats(uint64_t *meminfo, uint64_t *pageinfo);
void
BSDCPUInit();
void
BSDGetCPUTimes(uint64_t *timesArray, unsigned int cpu = 0);
int
BSDNetInit();
void
BSDGetNetInOut(uint64_t *inbytes, uint64_t *outbytes, const char *netIface, bool ignored);
int
BSDSwapInit();
void
BSDGetSwapInfo(uint64_t *total, uint64_t *free);
int
BSDDiskInit();
uint64_t
BSDGetDiskXFerBytes(uint64_t *read_bytes, uint64_t *write_bytes);
int
BSDIntrInit();
int
BSDNumInts();
void
BSDGetIntrStats(uint64_t *intrCount, unsigned int *intrNbrs);
int
BSDCountCpus(void);
#if defined(__i386__) || defined(__x86_64)
unsigned int
BSDGetCPUTemperature(float *temps, float *tjmax);
#endif
void
BSDGetSensor(const char *name, const char *valname, float *value, char *unit = NULL);
bool
BSDHasBattery();
void
BSDGetBatteryInfo(int *remaining, unsigned int *state);
#endif
|