《操作系统》的实验代码。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
302 B

10 years ago
  1. .text
  2. .globl kernel_thread_entry
  3. kernel_thread_entry: # void kernel_thread(void)
  4. pushl %edx # push arg
  5. call *%ebx # call fn
  6. pushl %eax # save the return value of fn(arg)
  7. call do_exit # call do_exit to terminate current thread