4 * @author Carlos O'Ryan <coryan@uci.edu>
9 #include "ace/Log_Msg.h"
10 #include "ace/OS_NS_errno.h"
12 #if !defined(__ACE_INLINE__)
13 #include "RT_Class.inl"
14 #endif /* __ACE_INLINE__ */
17 : prc_sched_class_ (ACE_SCHED_FIFO
)
18 , thr_sched_class_ (THR_SCHED_FIFO
)
21 (ACE_Sched_Params::priority_min (this->prc_sched_class_
)
22 + ACE_Sched_Params::priority_max (this->prc_sched_class_
)) / 2;
24 if (ACE_OS::sched_params (ACE_Sched_Params (this->prc_sched_class_
,
26 ACE_SCOPE_PROCESS
)) != 0)
28 if (ACE_OS::last_error () == EPERM
)
31 "WARNING (%P|%t) user does not have "
32 "permissions to run real-time tests.\n"
33 "The test will run in the time-shared "
34 "class, it may fail or produce unpredictable "
36 this->prc_sched_class_
= ACE_SCHED_OTHER
;
37 this->thr_sched_class_
= THR_SCHED_DEFAULT
;
41 ACE_Sched_Params::priority_min (this->prc_sched_class_
);
42 this->priority_high_
=
43 ACE_Sched_Params::priority_max (this->prc_sched_class_
);
44 this->priority_process_
=
45 (this->priority_low_
+ this->priority_high_
) / 2;