Linux kernel & device driver programming

Cross-Referenced Linux and Device Driver Code

[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ]
Version: [ 2.6.11.8 ] [ 2.6.25 ] [ 2.6.25.8 ] [ 2.6.31.13 ] Architecture: [ i386 ]
  1 # 1 "hello.c"
  2 # 1 "<built-in>"
  3 # 1 "<command line>"
  4 # 1 "hello.c"
  5 
  6 
  7 
  8 
  9 # 1 "/usr/include/linux/kernel.h" 1 3 4
 10 # 10 "/usr/include/linux/kernel.h" 3 4
 11 struct sysinfo {
 12  long uptime;
 13  unsigned long loads[3];
 14  unsigned long totalram;
 15  unsigned long freeram;
 16  unsigned long sharedram;
 17  unsigned long bufferram;
 18  unsigned long totalswap;
 19  unsigned long freeswap;
 20  unsigned short procs;
 21  unsigned short pad;
 22  unsigned long totalhigh;
 23  unsigned long freehigh;
 24  unsigned int mem_unit;
 25  char _f[20-2*sizeof(long)-sizeof(int)];
 26 };
 27 # 6 "hello.c" 2
 28 
 29 
 30 MODULE_LICENSE("Dual BSD/GPL");
 31 
 32 static int hello_init(void)
 33 {
 34  printk(KERN_ALERT "Hello, world\n");
 35  return 0;
 36 }
 37 
 38 static void hello_exit(void)
 39 {
 40  printk(KERN_ALERT "Goodbye, cruel world\n");
 41 }
 42 
 43 module_init(hello_init);
 44 module_exit(hello_exit);
  This page was automatically generated by the LXR engine.