Skip to content

Files

Latest commit

 

History

History
32 lines (26 loc) · 925 Bytes

linux-kernel-source.md

File metadata and controls

32 lines (26 loc) · 925 Bytes

Linux Kernel Source Code

Getting It

  • Git
  • Download
    • curl -LO https://github.com/torvalds/linux/archive/v4.4.zip
    • Unzip it using the command unzip v4.4.zip

Searching It

Key Locations

  • task_struct: Generic thread information struct, used on all platforms.
    • include/linux/sched.h
  • thread_info: Architecture specific thread information struct. Essentially a subclass of task_struct.
    • arch/x86/include/asm/thread_info.h
  • do_fork(...): Primary forking function.
    • kernel/fork.c
  • forget_original_parent(...): Reparents a task after its parent task has exited.
    • kernel/exit.c
  • context_switch(...): Main context switch function.
    • kernel/sched/core.c