Welcome to mirror list, hosted at ThFree Co, Russian Federation.

condition_bada.cpp « base - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c909cd9b2108b1bc53f77d43dc44319cb3d93d1e (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
52
53
54
#include "../std/target_os.hpp"

#ifdef OMIM_OS_BADA

#include "condition.hpp"

#include <FBaseRtThreadMonitor.h>

namespace threads
{
  namespace impl
  {
    class ConditionImpl
    {
    public:
      Osp::Base::Runtime::Monitor m_Monitor;
    };
  }

  Condition::Condition() : m_pImpl(new impl::ConditionImpl())
  {   
    m_pImpl->m_Monitor.Construct();
  }

  Condition::~Condition()
  {
    delete m_pImpl;
  }

  void Condition::Signal(bool broadcast)
  {
    if (broadcast)
      m_pImpl->m_Monitor.NotifyAll();
    else
      m_pImpl->m_Monitor.Notify();
  }

  void Condition::Wait()
  {
    m_pImpl->m_Monitor.Wait();
  }

  void Condition::Lock()
  {
    m_pImpl->m_Monitor.Enter();
  }

  void Condition::Unlock()
  {
    m_pImpl->m_Monitor.Exit();
  }
}

#endif // OMIM_OS_BADA