⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rt_class.cpp

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 CPP
字号:
/**
 * @file RT_Class.cpp
 *
 * RT_Class.cpp,v 1.3 2003/11/21 02:16:43 parsons Exp
 *
 * @author Carlos O'Ryan <coryan@uci.edu>
 */

#include "RT_Class.h"

#include "ace/Log_Msg.h"
#include "ace/OS_NS_errno.h"

#if !defined(__ACE_INLINE__)
#include "RT_Class.inl"
#endif /* __ACE_INLINE__ */

ACE_RCSID (TAO_PERF_RTEC, 
           RT_Class, 
           "RT_Class.cpp,v 1.3 2003/11/21 02:16:43 parsons Exp")

RT_Class::RT_Class (void)
  : prc_sched_class_ (ACE_SCHED_FIFO)
  , thr_sched_class_ (THR_SCHED_FIFO)
{
  int priority =
    (ACE_Sched_Params::priority_min (this->prc_sched_class_)
     + ACE_Sched_Params::priority_max (this->prc_sched_class_)) / 2;

  if (ACE_OS::sched_params (ACE_Sched_Params (this->prc_sched_class_,
                                              priority,
                                              ACE_SCOPE_PROCESS)) != 0)
    {
      if (ACE_OS::last_error () == EPERM)
        {
          ACE_DEBUG ((LM_DEBUG,
                      "WARNING (%P|%t) user does not have "
                      "permissions to run real-time tests.\n"
                      "The test will run in the time-shared "
                      "class, it may fail or produce unpredictable "
                      "results\n"));
          this->prc_sched_class_ = ACE_SCHED_OTHER;
          this->thr_sched_class_ = THR_SCHED_DEFAULT;
        }
    }
  this->priority_low_ =
    ACE_Sched_Params::priority_min (this->prc_sched_class_);
  this->priority_high_ =
    ACE_Sched_Params::priority_max (this->prc_sched_class_);
  this->priority_process_ =
    (this->priority_low_ + this->priority_high_) / 2;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -