blob: a2e5523d0e2ef3d46ac402883c6ae0e5d7c5b079 (
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
|
// $Id$
#include "ThreadStrategySingle.h"
#include "ace/Dynamic_Service.h"
ACE_RCSID (PortableServer,
ThreadStrategySingle,
"$Id$")
#if (TAO_HAS_MINIMUM_POA == 0)
namespace TAO
{
namespace Portable_Server
{
int
ThreadStrategySingle::enter ()
{
return lock_.acquire();
}
int
ThreadStrategySingle::exit ()
{
return lock_.release();
}
::PortableServer::ThreadPolicyValue
ThreadStrategySingle::type() const
{
return ::PortableServer::SINGLE_THREAD_MODEL;
}
ACE_FACTORY_DEFINE (TAO_PortableServer, ThreadStrategySingle)
ACE_STATIC_SVC_DEFINE (
ThreadStrategySingle,
ACE_TEXT ("ThreadStrategySingle"),
ACE_SVC_OBJ_T,
&ACE_SVC_NAME (ThreadStrategySingle),
ACE_Service_Type::DELETE_THIS | ACE_Service_Type::DELETE_OBJ,
0
)
#if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
template class ACE_Dynamic_Service<ThreadStrategySingle>;
#elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
#pragma instantiate ACE_Dynamic_Service<ThreadStrategySingle>
#endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */
}
}
#endif /* TAO_HAS_MINIMUM_POA == 0 */
|