Seg3D
2.4
Seg3D is a free volume segmentation and processing tool developed by the NIH Center for Integrative Biomedical Computing at the University of Utah Scientific Computing and Imaging (SCI) Institute.
Main Page
Namespaces
Classes
Files
File List
Core
ITKCommon
ThreadUtils
the_boost_mutex.hxx
1
/*
2
For more information, please see: http://software.sci.utah.edu
3
4
The MIT License
5
6
Copyright (c) 2016 Scientific Computing and Imaging Institute,
7
University of Utah.
8
9
10
Permission is hereby granted, free of charge, to any person obtaining a
11
copy of this software and associated documentation files (the "Software"),
12
to deal in the Software without restriction, including without limitation
13
the rights to use, copy, modify, merge, publish, distribute, sublicense,
14
and/or sell copies of the Software, and to permit persons to whom the
15
Software is furnished to do so, subject to the following conditions:
16
17
The above copyright notice and this permission notice shall be included
18
in all copies or substantial portions of the Software.
19
20
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
21
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
23
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
26
DEALINGS IN THE SOFTWARE.
27
*/
28
29
// File : the_boost_mutex.hxx
30
// Author : Pavel A. Koshevoy
31
// Created : Sat Oct 25 12:33:43 MDT 2008
32
// Copyright : (C) 2004-2008 University of Utah
33
// Description : A thin wrapper for Boost mutex class.
34
35
#ifndef THE_BOOST_MUTEX_HXX_
36
#define THE_BOOST_MUTEX_HXX_
37
38
// local includes:
39
#include <Core/ITKCommon/ThreadUtils/the_mutex_interface.hxx>
40
41
// Boost includes:
42
#include <boost/thread/mutex.hpp>
43
44
45
//----------------------------------------------------------------
46
// the_boost_mutex_t
47
//
48
class
the_boost_mutex_t
:
public
the_mutex_interface_t
49
{
50
public
:
51
the_boost_mutex_t
();
52
53
// the destructor is protected on purpose,
54
// see delete_this for details:
55
virtual
~
the_boost_mutex_t
();
56
57
// In order to avoid memory management problems with shared libraries,
58
// whoever provides this interface instance (via it's creator), has to
59
// provide a way to delete the instance as well. This will avoid
60
// issues with multiple-instances of C runtime libraries being
61
// used by the app and whatever libraries it links against that
62
// either use or provide this interface:
63
virtual
void
delete_this();
64
65
// the creation method:
66
static
the_mutex_interface_t
* create();
67
68
// virtual:
69
void
lock();
70
71
// virtual:
72
void
unlock();
73
74
// virtual:
75
bool
try_lock();
76
77
private
:
78
boost::mutex mutex_;
79
};
80
81
82
#endif // THE_BOOST_MUTEX_HXX_
the_mutex_interface_t
Definition:
the_mutex_interface.hxx:42
the_boost_mutex_t
Definition:
the_boost_mutex.hxx:48
Generated on Wed Jun 29 2016 22:41:22 for Seg3D by
1.8.10