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

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