init_task.c
上传用户:jlfgdled
上传日期:2013-04-10
资源大小:33168k
文件大小:1k
源码类别:

Linux/Unix编程

开发平台:

Unix_Linux

  1. #include <linux/mm.h>
  2. #include <linux/sched.h>
  3. #include <linux/init.h>
  4. #include <asm/uaccess.h>
  5. #include <asm/pgtable.h>
  6. #include <asm/desc.h>
  7. static struct fs_struct init_fs = INIT_FS;
  8. static struct files_struct init_files = INIT_FILES;
  9. static struct signal_struct init_signals = INIT_SIGNALS;
  10. struct mm_struct init_mm = INIT_MM(init_mm);
  11. /*
  12.  * Initial task structure.
  13.  *
  14.  * We need to make sure that this is 8192-byte aligned due to the
  15.  * way process stacks are handled. This is done by having a special
  16.  * "init_task" linker map entry..
  17.  */
  18. union task_union init_task_union 
  19. __attribute__((__section__(".data.init_task"))) =
  20. { INIT_TASK(init_task_union.task) };
  21. /*
  22.  * per-CPU TSS segments. Threads are completely 'soft' on Linux,
  23.  * no more per-task TSS's. The TSS size is kept cacheline-aligned
  24.  * so they are allowed to end up in the .data.cacheline_aligned
  25.  * section. Since TSS's are completely CPU-local, we want them
  26.  * on exact cacheline boundaries, to eliminate cacheline ping-pong.
  27.  */ 
  28. struct tss_struct init_tss[NR_CPUS] __cacheline_aligned = { [0 ... NR_CPUS-1] = INIT_TSS };