Leaked source code of windows server 2003
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.

70 lines
1.5 KiB

  1. /*++
  2. Copyright (c) 1995 Microsoft Corporation
  3. Module Name:
  4. cpumain.h
  5. Abstract:
  6. Prototypes from cpumain.c
  7. Author:
  8. 01-Aug-1995 Ori Gershony (t-orig)
  9. Revision History:
  10. 29-Jan-2000 SamerA Added CpupDoInterrupt and CpupRaiseException
  11. --*/
  12. #ifndef CPUMAIN_H
  13. #define CPUMAIN_H
  14. //
  15. // Indicator that threads must check CpuNotify. 0 if threads don't need
  16. // to check, nonzero if they do.
  17. //
  18. extern DWORD ProcessCpuNotify;
  19. //
  20. // Simulates an x86 software interrupt
  21. //
  22. NTSTATUS
  23. CpupDoInterrupt(
  24. IN DWORD InterruptNumber);
  25. //
  26. // Raises a software exception
  27. //
  28. NTSTATUS
  29. CpupRaiseException(
  30. IN PEXCEPTION_RECORD ExceptionRecord);
  31. //
  32. // Raises an exception from the cpu
  33. //
  34. VOID
  35. CpuRaiseStatus(
  36. NTSTATUS Status
  37. );
  38. //
  39. // The following two variables are used to synchronize intel instructions
  40. // with the LOCK prefix. The critical section is a lot faster, but it does
  41. // not guarantee synchronization in shared memory. Eventually we should use
  42. // the critical section by default, and the mutex for certain applications which
  43. // need it (maybe get a list from the registry).
  44. //
  45. extern HANDLE Wx86LockSynchMutexHandle;
  46. extern CRITICAL_SECTION Wx86LockSynchCriticalSection;
  47. //
  48. // The following variable decided which synchronization object is used
  49. //
  50. typedef enum {USECRITICALSECTION, USEMUTEX} SYNCHOBJECTTYPE;
  51. extern SYNCHOBJECTTYPE SynchObjectType;
  52. #endif // CPUMAIN_H