您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

hooks.c 742B

1234567891011121314151617181920212223242526272829303132
  1. #include "registers.h"
  2. #include "main.h"
  3. #include "hooks.h"
  4. /*
  5. * This file provides the basic entry points from assembly code. See
  6. * README.i386 for a description of the entry code path.
  7. *
  8. */
  9. /*
  10. * arch_main() : call main() and then exit via whatever exit mechanism
  11. * the prefix requested.
  12. *
  13. */
  14. void arch_main ( struct i386_all_regs *ix86 ) {
  15. void (*exit_path) ( struct i386_all_regs *ix86 );
  16. /* Determine exit path requested by prefix */
  17. exit_path = ( typeof ( exit_path ) ) ix86->regs.eax;
  18. /* Call to main() */
  19. ix86->regs.eax = main();
  20. if ( exit_path ) {
  21. /* Prefix requested that we use a particular function
  22. * as the exit path, so we call this function, which
  23. * must not return.
  24. */
  25. exit_path ( ix86 );
  26. }
  27. }