LCOV - code coverage report
Current view: top level - util - locks.h (source / functions) Hit Total Coverage
Test: report.info Lines: 0 3 0.0 %
Date: 2012-05-15 Functions: 0 5 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : // Copyright (C) 2011  Internet Systems Consortium, Inc. ("ISC")
       2                 :            : //
       3                 :            : // Permission to use, copy, modify, and/or distribute this software for any
       4                 :            : // purpose with or without fee is hereby granted, provided that the above
       5                 :            : // copyright notice and this permission notice appear in all copies.
       6                 :            : //
       7                 :            : // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
       8                 :            : // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
       9                 :            : // AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
      10                 :            : // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
      11                 :            : // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
      12                 :            : // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
      13                 :            : // PERFORMANCE OF THIS SOFTWARE.
      14                 :            : 
      15                 :            : /// This file (right now) provides dummy locks
      16                 :            : /// It also contains code to use boost/threads locks:
      17                 :            : ///
      18                 :            : ///
      19                 :            : /// All locks are dummy classes that don't actually do anything. At this moment, 
      20                 :            : /// only the very minimal set of methods that we actually use is defined.
      21                 :            : ///
      22                 :            : /// Note that we need to include <config.h> in our .cc files for that
      23                 :            : /// to be set. we might want to enfore this at compile time with a check
      24                 :            : /// (TODO)
      25                 :            : 
      26                 :            : #ifndef __LOCKS_
      27                 :            : #define __LOCKS_
      28                 :            : 
      29                 :            : namespace isc {
      30                 :            : namespace util {
      31                 :            : namespace locks {
      32                 :            : 
      33                 :            : class mutex {
      34                 :            : };
      35                 :            : 
      36                 :            : class recursive_mutex {
      37                 :            : };
      38                 :            : 
      39                 :            : class upgradable_mutex {
      40                 :            : };
      41                 :            : 
      42                 :            : template <typename T>
      43                 :            : class sharable_lock {
      44                 :            : public:
      45                 :          0 :     sharable_lock(T) { }
      46                 :            : };
      47                 :            : 
      48                 :            : template <typename T>
      49                 :            : class scoped_lock {
      50                 :            : public:
      51                 :          0 :     scoped_lock(T) { }
      52                 :            : 
      53                 :            :     void lock() {}
      54                 :          0 :     void unlock() {}
      55                 :            : };
      56                 :            : 
      57                 :            : } // namespace locks
      58                 :            : } // namespace util
      59                 :            : } // namespace isc
      60                 :            : 
      61                 :            : #endif // __LOCKS_

Generated by: LCOV version 1.9