blob: 80a4d36d13284fc6bf8cdc650cf1af679ac306d2 (
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
//
// $Id$
//
#include "RT_Current.h"
#if defined (TAO_HAS_CORBA_MESSAGING) && TAO_HAS_CORBA_MESSAGING != 0
#include "Priority_Mapping.h"
#include "tao/Stub.h"
#include "tao/ORB_Core.h"
#include "tao/Protocols_Hooks.h"
#include "ace/Thread.h"
#if !defined (__ACE_INLINE__)
#include "RT_Current.i"
#endif /* __ACE_INLINE__ */
ACE_RCSID (TAO,
RT_Current,
"$Id$")
TAO_RT_Current::TAO_RT_Current (TAO_ORB_Core *orb_core)
: orb_core_ (orb_core)
{
}
TAO_RT_Current::~TAO_RT_Current (void)
{
}
RTCORBA::Priority
TAO_RT_Current::the_priority (ACE_ENV_SINGLE_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
RTCORBA::Priority priority;
TAO_Protocols_Hooks *tph = this->orb_core_->get_protocols_hooks (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
int result = tph->get_thread_CORBA_priority (priority
ACE_ENV_ARG_PARAMETER);
ACE_CHECK_RETURN (-1);
if (result == -1)
ACE_THROW_RETURN (CORBA::DATA_CONVERSION (1, CORBA::COMPLETED_NO), -1);
return priority;
}
void
TAO_RT_Current::the_priority (RTCORBA::Priority the_priority
ACE_ENV_ARG_DECL)
ACE_THROW_SPEC ((CORBA::SystemException))
{
TAO_Protocols_Hooks *tph = this->orb_core_->get_protocols_hooks (ACE_ENV_SINGLE_ARG_PARAMETER);
ACE_CHECK;
int result = tph->set_thread_CORBA_priority (the_priority
ACE_ENV_ARG_PARAMETER);
ACE_CHECK;
if (result == -1)
ACE_THROW (CORBA::DATA_CONVERSION (1, CORBA::COMPLETED_NO));
}
#endif /* TAO_HAS_CORBA_MESSAGING && TAO_HAS_CORBA_MESSAGING != 0 */
|