root/include/linux/kernel.h

/* [previous][next][first][last][top][bottom][index][help] */

INCLUDED FROM


   1 #ifndef _LINUX_KERNEL_H
   2 #define _LINUX_KERNEL_H
   3 
   4 /*
   5  * 'kernel.h' contains some often-used function prototypes etc
   6  */
   7 
   8 void verify_area(void * addr,int count);
   9 volatile void panic(const char * str);
  10 volatile void do_exit(long error_code);
  11 unsigned long simple_strtoul(const char *,char **,unsigned int);
  12 int sprintf(char * buf, const char * fmt, ...);
  13 int printk(const char * fmt, ...);
  14 
  15 void * kmalloc(unsigned int size, int priority);
  16 void kfree_s(void * obj, int size);
  17 
  18 #define kfree(x) kfree_s((x), 0)
  19 
  20 /*
  21  * This is defined as a macro, but at some point this might become a
  22  * real subroutine that sets a flag if it returns true (to do
  23  * BSD-style accounting where the process is flagged if it uses root
  24  * privs).  The implication of this is that you should do normal
  25  * permissions checks first, and check suser() last.
  26  */
  27 #define suser() (current->euid == 0)
  28 
  29 #define SI_LOAD_SHIFT   16
  30 struct sysinfo {
  31         long uptime;                    /* Seconds since boot */
  32         unsigned long loads[3];         /* 1, 5, and 15 minute load averages */
  33         unsigned long totalram;         /* Total usable main memory size */
  34         unsigned long freeram;          /* Available memory size */
  35         unsigned long sharedram;        /* Amount of shared memory */
  36         unsigned long bufferram;        /* Memory used by buffers */
  37         unsigned long totalswap;        /* Total swap space size */
  38         unsigned long freeswap;         /* swap space still available */
  39         unsigned short procs;           /* Number of current processes */
  40         char _f[22];                    /* Pads structure to 64 bytes */
  41 };
  42 
  43 #endif

/* [previous][next][first][last][top][bottom][index][help] */