summaryrefslogtreecommitdiff
path: root/ACE/ace/Live_P_Strategy.h
blob: 420307d23489b6e284c8cbf0957079a96111eb7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// -*- C++ -*-

//=============================================================================
/**
 *  @file    Live_P_Strategy.h
 *
 *
 *
 *
 *
 *  @author Paul Oberlin <pauloberlin@gmail.com>
 */
//=============================================================================

#ifndef ACE_LIVE_P_STRATEGY_H
#define ACE_LIVE_P_STRATEGY_H

#include /**/ "ace/pre.h"

#include "ace/DA_Strategy_Base.h"
#include "ace/RB_Tree.h"

#if !defined (ACE_LACKS_PRAGMA_ONCE)
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */

//forward decl
class LivePTree;

template <typename AnnotationId>
class Live_P_Strategy : public DA_Strategy_Base<AnnotationId> {

  //The annotations consist of an identifier and a resource cost value

public:
    Live_P_Strategy(int maxThreads);
    virtual ~Live_P_Strategy();
    virtual bool is_deadlock_potential(AnnotationId handle);
    virtual void grant(AnnotationId handle);
    virtual void release(AnnotationId upcall_handle);
private:
   LivePTree* tree_pimpl_; 
  
};
#if defined (__ACE_INLINE__)
#include "ace/Live_P_Strategy.inl"
#endif /* __ACE_INLINE__ */

#include /**/ "ace/post.h"

#endif /* ACE_LIVE_P_STRATEGY_H */