STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
locking.h
Go to the documentation of this file.
1 /***
2 *sys/locking.h - flags for locking() function
3 *
4 * Copyright (c) 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 
14 #pragma once
15 
16 #ifndef _INC_LOCKING
17 #define _INC_LOCKING
18 
19 #if !defined (_WIN32)
20 #error ERROR: Only Win32 target supported!
21 #endif /* !defined (_WIN32) */
22 
23 
24 #define _LK_UNLCK 0 /* unlock the file region */
25 #define _LK_LOCK 1 /* lock the file region */
26 #define _LK_NBLCK 2 /* non-blocking lock */
27 #define _LK_RLCK 3 /* lock for writing */
28 #define _LK_NBRLCK 4 /* non-blocking lock for writing */
29 
30 #if !__STDC__
31 /* Non-ANSI names for compatibility */
32 #define LK_UNLCK _LK_UNLCK
33 #define LK_LOCK _LK_LOCK
34 #define LK_NBLCK _LK_NBLCK
35 #define LK_RLCK _LK_RLCK
36 #define LK_NBRLCK _LK_NBRLCK
37 #endif /* !__STDC__ */
38 
39 #endif /* _INC_LOCKING */