ReactOS  0.4.14-dev-55-g2da92ac
concurrencysal.h
Go to the documentation of this file.
1 /*
2  * concurrencysal.h
3  *
4  * Standard Annotation Language (SAL) definitions for synchronisation
5  *
6  * This file is part of the ReactOS PSDK package.
7  *
8  * Contributors:
9  * Timo Kreuzer (timo.kreuzer@reactos.org)
10  *
11  * THIS SOFTWARE IS NOT COPYRIGHTED
12  *
13  * This source code is offered for use in the public domain. You may
14  * use, modify or distribute it freely.
15  *
16  * This code is distributed in the hope that it will be useful but
17  * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18  * DISCLAIMED. This includes but is not limited to warranties of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20  *
21  */
22 
23 #if defined(_PREFAST_)
24 
25 #define _Benign_race_begin_ __pragma(warning(push)) __pragma(warning(disable:26100 26101 26150 26130 26180 26131 26181 28112))
26 #define _Benign_race_end_ __pragma(warning(pop))
27 #define _No_competing_thread_begin_ __pragma(warning(push)) __pragma(warning(disable:26100 26101 26150 26101 26151 26110 26160 26130 26180 26131 26181 28112))
28 #define _No_competing_thread_end_ __pragma(warning(pop))
29 
30 #define _Acquires_exclusive_lock_(lock)
31 #define _Acquires_lock_(lock)
32 #define _Acquires_nonreentrant_lock_(lock)
33 #define _Acquires_shared_lock_(lock)
34 #define _Analysis_assume_lock_acquired_(lock)
35 #define _Analysis_assume_lock_released_(lock)
36 #define _Analysis_assume_lock_held_(lock)
37 #define _Analysis_assume_lock_not_held_(lock)
38 #define _Analysis_assume_same_lock_(lock1, lock2)
39 #define _Analysis_suppress_lock_checking_(lock)
40 #define _Create_lock_level_(level)
41 #define _Csalcat1_(x,y)
42 #define _Csalcat2_(x,y)
43 #define _Function_ignore_lock_checking_(lock)
44 #define _Guarded_by_(lock)
45 #define _Has_lock_kind_(kind)
46 #define _Has_lock_level_(level)
47 #define _Interlocked_
48 #define _Internal_lock_level_order_(a,b)
49 #define _Lock_level_order_(a,b)
50 #define _No_competing_thread_
51 #define _Post_same_lock_(lock1,lock2)
52 #define _Releases_exclusive_lock_(lock)
53 #define _Releases_lock_(lock)
54 #define _Releases_nonreentrant_lock_(lock)
55 #define _Releases_shared_lock_(lock)
56 #define _Requires_exclusive_lock_held_(lock)
57 #define _Requires_shared_lock_held_(lock)
58 #define _Requires_lock_held_(lock)
59 #define _Requires_lock_not_held_(lock)
60 #define _Requires_no_locks_held_
61 #define _Write_guarded_by_(lock)
62 
63 
64 const char _Lock_kind_mutex_[] = "";
65 const char _Lock_kind_event_[] = "";
66 const char _Lock_kind_semaphore_[] = "";
67 const char _Lock_kind_spin_lock_[] = "";
68 const char _Lock_kind_critical_section_[] = "";
69 
70 #else /* _PREFAST_ */
71 
72 #define _Benign_race_begin_ __pragma(warning(push))
73 #define _Benign_race_end_ __pragma(warning(pop))
74 #define _No_competing_thread_begin_ __pragma(warning(push))
75 #define _No_competing_thread_end_ __pragma(warning(pop))
76 
77 #define _Acquires_exclusive_lock_(lock)
78 #define _Acquires_lock_(lock)
79 #define _Acquires_nonreentrant_lock_(lock)
80 #define _Acquires_shared_lock_(lock)
81 #define _Analysis_assume_lock_acquired_(lock)
82 #define _Analysis_assume_lock_released_(lock)
83 #define _Analysis_assume_lock_held_(lock)
84 #define _Analysis_assume_lock_not_held_(lock)
85 #define _Analysis_assume_same_lock_(lock1, lock2)
86 #define _Analysis_suppress_lock_checking_(lock)
87 #define _Create_lock_level_(level)
88 #define _Csalcat1_(x,y)
89 #define _Csalcat2_(x,y)
90 #define _Function_ignore_lock_checking_(lock)
91 #define _Guarded_by_(lock)
92 #define _Has_lock_kind_(kind)
93 #define _Has_lock_level_(level)
94 #define _Interlocked_
95 #define _Internal_lock_level_order_(a,b)
96 #define _Lock_level_order_(a,b)
97 #define _No_competing_thread_
98 #define _Post_same_lock_(lock1,lock2)
99 #define _Releases_exclusive_lock_(lock)
100 #define _Releases_lock_(lock)
101 #define _Releases_nonreentrant_lock_(lock)
102 #define _Releases_shared_lock_(lock)
103 #define _Requires_exclusive_lock_held_(lock)
104 #define _Requires_shared_lock_held_(lock)
105 #define _Requires_lock_held_(lock)
106 #define _Requires_lock_not_held_(lock)
107 #define _Requires_no_locks_held_
108 #define _Write_guarded_by_(lock)
109 
110 #endif /* _PREFAST_ */
111 
112 #if 0 /* Check these */
113 #define _Internal_set_lock_count_(lock, count)
114 #define _Internal_set_lock_count_to_zero_(lock)
115 #define _Internal_set_lock_count_to_one_(lock)
116 #endif // 0
117