2015-01-27 06:35:29 -05:00
|
|
|
#ifndef SHARED_BARRIERS_HPP
|
|
|
|
#define SHARED_BARRIERS_HPP
|
2011-01-09 16:42:27 -05:00
|
|
|
|
2016-10-07 10:08:08 -04:00
|
|
|
#include <boost/interprocess/sync/named_sharable_mutex.hpp>
|
2016-10-07 19:52:47 -04:00
|
|
|
#include <boost/interprocess/sync/named_upgradable_mutex.hpp>
|
2011-01-09 16:42:27 -05:00
|
|
|
|
2016-01-05 10:51:13 -05:00
|
|
|
namespace osrm
|
|
|
|
{
|
2016-01-07 13:19:55 -05:00
|
|
|
namespace storage
|
2016-01-05 10:51:13 -05:00
|
|
|
{
|
2016-10-07 19:52:47 -04:00
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
struct SharedBarriers
|
2014-05-07 10:50:48 -04:00
|
|
|
{
|
2013-12-13 17:26:57 -05:00
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
SharedBarriers()
|
2016-10-07 19:52:47 -04:00
|
|
|
: current_regions_mutex(boost::interprocess::open_or_create, "current_regions"),
|
|
|
|
regions_1_mutex(boost::interprocess::open_or_create, "regions_1"),
|
|
|
|
regions_2_mutex(boost::interprocess::open_or_create, "regions_2")
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2016-10-07 19:52:47 -04:00
|
|
|
boost::interprocess::named_upgradable_mutex current_regions_mutex;
|
|
|
|
boost::interprocess::named_sharable_mutex regions_1_mutex;
|
|
|
|
boost::interprocess::named_sharable_mutex regions_2_mutex;
|
2011-01-09 16:42:27 -05:00
|
|
|
};
|
2016-10-07 19:52:47 -04:00
|
|
|
|
2016-01-05 10:51:13 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
#endif // SHARED_BARRIERS_HPP
|