2015-01-27 06:35:29 -05:00
|
|
|
#ifndef SHARED_BARRIERS_HPP
|
|
|
|
#define SHARED_BARRIERS_HPP
|
2011-01-09 16:42:27 -05:00
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
#include <boost/interprocess/sync/named_condition.hpp>
|
2016-05-27 15:05:04 -04:00
|
|
|
#include <boost/interprocess/sync/named_mutex.hpp>
|
2016-10-07 10:08:08 -04:00
|
|
|
#include <boost/interprocess/sync/named_sharable_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
|
|
|
{
|
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()
|
|
|
|
: pending_update_mutex(boost::interprocess::open_or_create, "pending_update"),
|
2016-10-07 10:08:08 -04:00
|
|
|
query_mutex(boost::interprocess::open_or_create, "query")
|
2015-01-27 06:35:29 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
// Mutex to protect access to the boolean variable
|
|
|
|
boost::interprocess::named_mutex pending_update_mutex;
|
2016-10-07 10:08:08 -04:00
|
|
|
boost::interprocess::named_sharable_mutex query_mutex;
|
2011-01-09 16:42:27 -05:00
|
|
|
};
|
2016-01-05 10:51:13 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-01-27 06:35:29 -05:00
|
|
|
#endif // SHARED_BARRIERS_HPP
|