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.

49 lines
1012 B

  1. /***
  2. *sys/locking.h - flags for locking() function
  3. *
  4. * Copyright (c) 1985-1997, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * This file defines the flags for the locking() function.
  8. * [System V]
  9. *
  10. * [Public]
  11. *
  12. ****/
  13. #if _MSC_VER > 1000
  14. #pragma once
  15. #endif
  16. #ifndef _INC_LOCKING
  17. #define _INC_LOCKING
  18. #if !defined(_WIN32) && !defined(_MAC)
  19. #error ERROR: Only Mac or Win32 targets supported!
  20. #endif
  21. #define _LK_UNLCK 0 /* unlock the file region */
  22. #ifdef _WIN32
  23. #define _LK_LOCK 1 /* lock the file region */
  24. #endif
  25. #define _LK_NBLCK 2 /* non-blocking lock */
  26. #ifdef _WIN32
  27. #define _LK_RLCK 3 /* lock for writing */
  28. #endif
  29. #define _LK_NBRLCK 4 /* non-blocking lock for writing */
  30. #if !__STDC__
  31. /* Non-ANSI names for compatibility */
  32. #define LK_UNLCK _LK_UNLCK
  33. #ifdef _WIN32
  34. #define LK_LOCK _LK_LOCK
  35. #endif
  36. #define LK_NBLCK _LK_NBLCK
  37. #ifdef _WIN32
  38. #define LK_RLCK _LK_RLCK
  39. #endif
  40. #define LK_NBRLCK _LK_NBRLCK
  41. #endif
  42. #endif /* _INC_LOCKING */