Put the objects before the libraries when building
[nmdb.git] / nmdb / sparse.h
blobc48b16395ea5d7d829d1ee80aaaf5f99d2503a1e
2 /* Useful defines to use with sparse */
4 #ifndef _SPARSE_H
5 #define _SPARSE_H
7 #ifdef __CHECKER__
8 # define __acquires(x) __attribute__((context(x,0,1)))
9 # define __releases(x) __attribute__((context(x,1,0)))
10 # define __acquire(x) __context__(x,1)
11 # define __release(x) __context__(x,-1)
12 /* __with_lock_acquired() is at the moment just documentation, but we keep it
13 * in case sparse gets the ability to match exact contexts again */
14 //# define __with_lock_acquired(x) __attribute__((exact_context(x,1,1)))
15 # define __with_lock_acquired(x)
16 #else
17 # define __acquires(x)
18 # define __releases(x)
19 # define __with_lock_acquired(x)
20 # define __acquire(x) (void)0
21 # define __release(x) (void)0
22 #endif
24 #endif