summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/Notify/ID_Factory.inl
blob: 6aa178a4421244a7081ffa903a9dfe6b85810610 (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
// -*- C++ -*-
//
// $Id$

TAO_BEGIN_VERSIONED_NAMESPACE_DECL

ACE_INLINE TAO_Notify_Object::ID
TAO_Notify_ID_Factory::id (void)
{
  ACE_GUARD_RETURN (TAO_SYNCH_MUTEX, ace_mon, this->mtx_, 0);
  return ++seed_;
}

ACE_INLINE void
TAO_Notify_ID_Factory::set_last_used (const TAO_Notify_Object::ID id)
{
  ACE_GUARD (TAO_SYNCH_MUTEX, ace_mon, this->mtx_);
  if (this->seed_ < id)
  {
    this->seed_ = id;
  }
}

TAO_END_VERSIONED_NAMESPACE_DECL