~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/user_locks/barriers.h

  • Committer: Monty Taylor
  • Date: 2010-11-24 19:33:25 UTC
  • mto: (1953.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1955.
  • Revision ID: mordred@inaugust.com-20101124193325-7rxjg5jwto3lfms9
protobuf requires pthread. It's just the way it is.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <boost/thread/mutex.hpp>
22
22
#include <boost/thread/condition_variable.hpp>
23
23
#include <boost/unordered_map.hpp>
 
24
#include <boost/logic/tribool.hpp>
24
25
#include <boost/unordered/unordered_set.hpp>
25
26
 
26
27
#include <string>
37
38
 
38
39
const size_t LARGEST_BARRIER_NAME= 64;
39
40
 
40
 
enum return_t {
41
 
  SUCCESS,
42
 
  NOT_FOUND,
43
 
  NOT_OWNED_BY
44
 
};
45
 
 
46
41
class Barriers
47
42
{
48
43
public:
56
51
 
57
52
  bool create(const user_locks::Key &arg, drizzled::session_id_t owner);
58
53
  bool create(const user_locks::Key &arg, drizzled::session_id_t owner, int64_t wait_count);
59
 
  return_t release(const user_locks::Key &arg, drizzled::session_id_t owner);
 
54
  boost::tribool release(const user_locks::Key &arg, drizzled::session_id_t owner);
60
55
  Barrier::shared_ptr find(const user_locks::Key &arg);
61
56
  void Copy(Map &arg);
62
57