github.com/cellofellow/gopkg@v0.0.0-20140722061823-eec0544a62ad/database/leveldb.chai2010/include/port/thread_annotations.h (about)

     1  // Copyright (c) 2012 The LevelDB Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style license that can be
     3  // found in the LICENSE file. See the AUTHORS file for names of contributors.
     4  
     5  #ifndef STORAGE_LEVELDB_PORT_THREAD_ANNOTATIONS_H
     6  
     7  // Some environments provide custom macros to aid in static thread-safety
     8  // analysis.  Provide empty definitions of such macros unless they are already
     9  // defined.
    10  
    11  #ifndef EXCLUSIVE_LOCKS_REQUIRED
    12  #define EXCLUSIVE_LOCKS_REQUIRED(...)
    13  #endif
    14  
    15  #ifndef SHARED_LOCKS_REQUIRED
    16  #define SHARED_LOCKS_REQUIRED(...)
    17  #endif
    18  
    19  #ifndef LOCKS_EXCLUDED
    20  #define LOCKS_EXCLUDED(...)
    21  #endif
    22  
    23  #ifndef LOCK_RETURNED
    24  #define LOCK_RETURNED(x)
    25  #endif
    26  
    27  #ifndef LOCKABLE
    28  #define LOCKABLE
    29  #endif
    30  
    31  #ifndef SCOPED_LOCKABLE
    32  #define SCOPED_LOCKABLE
    33  #endif
    34  
    35  #ifndef EXCLUSIVE_LOCK_FUNCTION
    36  #define EXCLUSIVE_LOCK_FUNCTION(...)
    37  #endif
    38  
    39  #ifndef SHARED_LOCK_FUNCTION
    40  #define SHARED_LOCK_FUNCTION(...)
    41  #endif
    42  
    43  #ifndef EXCLUSIVE_TRYLOCK_FUNCTION
    44  #define EXCLUSIVE_TRYLOCK_FUNCTION(...)
    45  #endif
    46  
    47  #ifndef SHARED_TRYLOCK_FUNCTION
    48  #define SHARED_TRYLOCK_FUNCTION(...)
    49  #endif
    50  
    51  #ifndef UNLOCK_FUNCTION
    52  #define UNLOCK_FUNCTION(...)
    53  #endif
    54  
    55  #ifndef NO_THREAD_SAFETY_ANALYSIS
    56  #define NO_THREAD_SAFETY_ANALYSIS
    57  #endif
    58  
    59  #endif  // STORAGE_LEVELDB_PORT_THREAD_ANNOTATIONS_H