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.

40 lines
843 B

  1. //+------------------------------------------------------------
  2. //
  3. // Copyright (C) 1998, Microsoft Corporation
  4. //
  5. // File: spinlock.h
  6. //
  7. // Contents: Spinlock package
  8. //
  9. // Classes:
  10. //
  11. // Functions:
  12. //
  13. // History:
  14. // jstamerj 980511 17:25:05: Created.
  15. //
  16. //-------------------------------------------------------------
  17. #include <windows.h>
  18. //
  19. // Simple spinlock package used by CLdapConnection
  20. //
  21. typedef LONG SPIN_LOCK;
  22. typedef LPLONG PSPIN_LOCK;
  23. typedef VOID (__stdcall *PFN_ACQUIRESPINLOCK)(PSPIN_LOCK);
  24. extern PFN_ACQUIRESPINLOCK g_AcquireSpinLock;
  25. VOID InitializeSpinLock(
  26. PSPIN_LOCK psl);
  27. #define AcquireSpinLock (*g_AcquireSpinLock)
  28. VOID AcquireSpinLockSingleProc(
  29. PSPIN_LOCK psl);
  30. VOID AcquireSpinLockMultipleProc(
  31. PSPIN_LOCK psl);
  32. VOID ReleaseSpinLock(
  33. PSPIN_LOCK psl);