Source code of Windows XP (NT5)
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.

63 lines
1.3 KiB

  1. /*++
  2. Copyright (c) 1999 Intel Corporation
  3. Module Name:
  4. stall.c
  5. Abstract:
  6. Revision History
  7. --*/
  8. #include "shell.h"
  9. EFI_STATUS
  10. InitializeStall (
  11. IN EFI_HANDLE ImageHandle,
  12. IN EFI_SYSTEM_TABLE *SystemTable
  13. );
  14. EFI_DRIVER_ENTRY_POINT(InitializeStall)
  15. EFI_STATUS
  16. InitializeStall (
  17. IN EFI_HANDLE ImageHandle,
  18. IN EFI_SYSTEM_TABLE *SystemTable
  19. )
  20. /*+++
  21. stall [microseconds]
  22. --*/
  23. {
  24. UINTN Microseconds;
  25. InstallInternalShellCommand (
  26. ImageHandle, SystemTable, InitializeStall,
  27. L"stall", /* command */
  28. L"stall microseconds", /* command syntax */
  29. L"Delay for x microseconds", /* 1 line descriptor */
  30. NULL /* command help page */
  31. );
  32. InitializeShellApplication (ImageHandle, SystemTable);
  33. if (SI->Argc != 2) {
  34. Print(L"stall [microseconds]\n");
  35. return EFI_SUCCESS;
  36. }
  37. if (BS->Stall == NULL) {
  38. Print(L"ERROR : Stall service is not available.\n");
  39. return EFI_UNSUPPORTED;
  40. }
  41. Microseconds = Atoi(SI->Argv[1]);
  42. Print(L"Stall for %d uS\n",Microseconds);
  43. BS->Stall(Microseconds);
  44. return EFI_SUCCESS;
  45. }