本网站可以出售:只需60000元直接拥有。QQ:939804642
您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ACELIB_ERROR_RETURN函数代码示例

51自学网 2021-06-01 19:32:00
  C++
这篇教程C++ ACELIB_ERROR_RETURN函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中ACELIB_ERROR_RETURN函数的典型用法代码示例。如果您正苦于以下问题:C++ ACELIB_ERROR_RETURN函数的具体用法?C++ ACELIB_ERROR_RETURN怎么用?C++ ACELIB_ERROR_RETURN使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了ACELIB_ERROR_RETURN函数的22个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: ACE_TRACE

intACE_Token_Proxy::renew (int requeue_position,                        ACE_Synch_Options &options){  ACE_TRACE ("ACE_Token_Proxy::renew");  if (this->token_ == 0)    {      errno = ENOENT;      ACELIB_ERROR_RETURN ((LM_ERROR,                         ACE_TEXT ("Not open./n")),                        -1);    }  // Make sure no one calls our token_acquired until we have a chance  // to sleep first!  this->waiter_->cond_var_.mutex ().acquire ();  if (this->token_->renew (this->waiter_, requeue_position) == -1)    {      // check for error      if (errno != EWOULDBLOCK)        ACELIB_ERROR_RETURN ((LM_ERROR,                           ACE_TEXT ("%p renew failed/n"), ACE_TEXT ("ACE_Token_Proxy")), -1);      if (this->debug_)        ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("(%t) renew blocking for %s, owner is %s/n"),                    this->name (),                    token_->owner_id ()));      // no error, but would block, so block or return      return this->handle_options (options, waiter_->cond_var_);    }  else    // we have the token    {      if (this->debug_)        ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("(%t) renewed %s/n"),                    this->name ()));      waiter_->cond_var_.mutex ().release ();      return 0;    }}
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:42,


示例2: ACELIB_ERROR_RETURN

void*ACE_Threading_Helper<ACE_Thread_Mutex>::get (void){  void* temp = 0;  if (ACE_Thread::getspecific (key_, &temp) == -1)    ACELIB_ERROR_RETURN ((LM_ERROR,                       ACE_TEXT ("(%P|%t) Service Config failed to get thread key value: %p/n"),                       ACE_TEXT("")),                      0);  return temp;}
开发者ID:CCJY,项目名称:ACE,代码行数:11,


示例3: ACELIB_ERROR_RETURN

intACE_RAPI_Session::update_qos (void){  // Update the session QoS Parameters based on the RSVP Event Received.  if ((rsvp_error = rapi_dispatch ()) != 0)    ACELIB_ERROR_RETURN ((LM_ERROR,                       "Error in rapi_dispatch () : %s/n",                       rapi_errlist[rsvp_error]),                      -1);  return 0;}
开发者ID:AtVirus,项目名称:SkyFireEMU,代码行数:11,


示例4: while

intACE_Proactor_Timer_Handler::svc (void){  ACE_Time_Value absolute_time;  ACE_Time_Value relative_time;  int result = 0;  while (this->shutting_down_ == 0)    {      // Check whether the timer queue has any items in it.      if (this->proactor_.timer_queue ()->is_empty () == 0)        {          // Get the earliest absolute time.          absolute_time = this->proactor_.timer_queue ()->earliest_time ();          // Get current time from timer queue since we don't know          // which <gettimeofday> was used.          ACE_Time_Value cur_time =            this->proactor_.timer_queue ()->gettimeofday ();          // Compare absolute time with curent time received from the          // timer queue.          if (absolute_time > cur_time)            relative_time = absolute_time - cur_time;          else            relative_time = ACE_Time_Value::zero;          // Block for relative time.          result = this->timer_event_.wait (&relative_time, 0);        }      else        // The timer queue has no entries, so wait indefinitely.        result = this->timer_event_.wait ();      // Check for timer expiries.      if (result == -1)        {          switch (errno)            {            case ETIME:              // timeout: expire timers              this->proactor_.timer_queue ()->expire ();              break;            default:              // Error.              ACELIB_ERROR_RETURN ((LM_ERROR,                                 ACE_TEXT ("%N:%l:(%P | %t):%p/n"),                                 ACE_TEXT ("ACE_Proactor_Timer_Handler::svc:wait failed")),                                -1);            }        }    }  return 0;}
开发者ID:GlassFace,项目名称:sunwell,代码行数:54,


示例5: ACE_TRACE

intACE_Name_Proxy::request_reply (ACE_Name_Request &request){  ACE_TRACE ("ACE_Name_Proxy::request_reply");  void *buffer;  ssize_t length = request.encode (buffer);  if (length == -1)    ACELIB_ERROR_RETURN ((LM_ERROR,                       ACE_TEXT ("%p/n"),                       ACE_TEXT ("encode failed")),                      -1);  // Transmit request via a blocking send.  if (this->peer_.send_n (buffer, length) != length)    ACELIB_ERROR_RETURN ((LM_ERROR,                       ACE_TEXT ("%p/n"),                       ACE_TEXT ("send_n failed")),                      -1);  else    {      ACE_Name_Reply reply;      // Receive reply via blocking read.      if (this->peer_.recv_n (&reply,                              sizeof reply) == -1)        ACELIB_ERROR_RETURN ((LM_ERROR,                           ACE_TEXT ("%p/n"),                           ACE_TEXT ("recv failed")),                          -1);      else if (reply.decode () == -1)        ACELIB_ERROR_RETURN ((LM_ERROR,                           ACE_TEXT ("%p/n"),                           ACE_TEXT ("decode failed")),                          -1);      errno = int (reply.errnum ());      return reply.status ();    }}
开发者ID:GlassFace,项目名称:sunwell,代码行数:41,


示例6: ACE_TRACE

intACE_Service_Config::parse_args_i (int argc, ACE_TCHAR *argv[]){  ACE_TRACE ("ACE_Service_Config::parse_args_i");  // Using PERMUTE_ARGS (default) in order to have all  // unrecognized options and their value arguments moved  // to the end of the argument vector. We'll pick them up  // after processing our options and pass them on to the  // base class for further parsing.  //FUZZ: disable check_for_lack_ACE_OS  ACE_Get_Opt getopt (argc,                      argv,                      ACE_TEXT ("bs:p:"),                      1  ,                       // Start at argv[1].                      0,                       // Do not report errors                      ACE_Get_Opt::RETURN_IN_ORDER);  //FUZZ: enable check_for_lack_ACE_OS  //FUZZ: disable check_for_lack_ACE_OS  for (int c; (c = getopt ()) != -1; )  //FUZZ: enable check_for_lack_ACE_OS    switch (c)      {      case 'p':        ACE_Service_Config::pid_file_name_ = getopt.opt_arg ();        break;      case 'b':        ACE_Service_Config::be_a_daemon_ = true;        break;      case 's':        {          // There's no point in dealing with this on NT since it          // doesn't really support signals very well...#if !defined (ACE_LACKS_UNIX_SIGNALS)          ACE_Service_Config::signum_ =            ACE_OS::atoi (getopt.opt_arg ());          if (ACE_Reactor::instance ()->register_handler              (ACE_Service_Config::signum_,               ACE_Service_Config::signal_handler_) == -1)            ACELIB_ERROR_RETURN ((LM_ERROR,                               ACE_TEXT ("cannot obtain signal handler/n")),                              -1);#endif /* ACE_LACKS_UNIX_SIGNALS */          break;        }      default:; // unknown arguments are benign      }  return 0;} /* parse_args_i () */
开发者ID:CCJY,项目名称:ACE,代码行数:53,


示例7: ACE_TRACE

// Compute the new map_size of the backing store and commit the// memory.intACE_MMAP_Memory_Pool::commit_backing_store_name (size_t rounded_bytes,                                                 size_t & map_size){  ACE_TRACE ("ACE_MMAP_Memory_Pool::commit_backing_store_name");#if defined (__Lynx__)  map_size = rounded_bytes;#else  size_t seek_len;  if (this->write_each_page_)    // Write to the end of every block to ensure that we have enough    // space in the backing store.    seek_len = this->round_up (1); // round_up(1) is one page.  else    // We're willing to risk it all in the name of efficiency...    seek_len = rounded_bytes;  // The following loop will execute multiple times (if  // this->write_each_page == 1) or just once (if  // this->write_each_page == 0).  for (size_t cur_block = 0;       cur_block < rounded_bytes;       cur_block += seek_len)    {      map_size =        ACE_Utils::truncate_cast<size_t> (          ACE_OS::lseek (this->mmap_.handle (),                         static_cast<ACE_OFF_T> (seek_len - 1),                         SEEK_END));      if (map_size == static_cast<size_t> (-1)          || ACE_OS::write (this->mmap_.handle (),                            "",                            1) == -1)        ACELIB_ERROR_RETURN ((LM_ERROR,                           ACE_TEXT ("(%P|%t) %p/n"),                           this->backing_store_name_),                          -1);    }#if defined (ACE_OPENVMS)  ::fsync(this->mmap_.handle());#endif  // Increment by one to put us at the beginning of the next chunk...  ++map_size;#endif /* __Lynx__ */  return 0;}
开发者ID:Arkania,项目名称:ArkCORE-NG,代码行数:54,


示例8: ACE_TRACE

intACE_Remote_Token_Proxy::initiate_connection (void){    ACE_TRACE ("ACE_Remote_Token_Proxy::initiate_connection");    if (token_ == 0)    {        errno = ENOENT;        ACELIB_ERROR_RETURN ((LM_ERROR,                              ACE_TEXT ("ACE_Remote_Token_Proxy not open./n")), -1);    }    ACE_SOCK_Stream *peer = ACE_Token_Connections::instance ()->get_connection ();    return peer == 0 ? 0 : 1;}
开发者ID:binary42,项目名称:OCI,代码行数:14,


示例9: ACELIB_ERROR_RETURN

intACE_Proactor_Handle_Timeout_Upcall::proactor (ACE_Proactor &proactor){  if (this->proactor_ == 0)    {      this->proactor_ = &proactor;      return 0;    }  else    ACELIB_ERROR_RETURN ((LM_ERROR,                       ACE_TEXT ("ACE_Proactor_Handle_Timeout_Upcall is only suppose")                       ACE_TEXT (" to be used with ONE (and only one) Proactor/n")),                      -1);}
开发者ID:GlassFace,项目名称:sunwell,代码行数:14,


示例10: ACELIB_ERROR_RETURN

intACE_ARGV_T<CHAR_TYPE>::add (const CHAR_TYPE *next_arg, bool quote_arg){  // Only allow this to work in the "iterative" verion -- the  // ACE_ARGVs created with the one argument constructor.  if (!this->iterative_)    {      errno = EINVAL;      return -1;    }  this->length_ += ACE_OS::strlen (next_arg);  if (quote_arg && ACE_OS::strchr (next_arg, ' ') != 0)    {      this->length_ += 2;      if (ACE_OS::strchr (next_arg, '"') != 0)        for (const CHAR_TYPE * p = next_arg; *p != '/0'; ++p)          if (*p == '"') ++this->length_;    }  else    {      quote_arg = false;    }  // Put the new argument at the end of the queue.  if (this->queue_.enqueue_tail (ACE_ARGV_Queue_Entry_T<CHAR_TYPE> (next_arg, quote_arg)) == -1)    ACELIB_ERROR_RETURN ((LM_ERROR,                       ACE_TEXT ("Can't add more to ARGV queue")),                      -1);  ++this->argc_;  // Wipe argv_ and buf_ away so that they will be recreated if the  // user calls argv () or buf ().  if (this->argv_ != 0)    {      for (int i = 0; this->argv_[i] != 0; i++)        ACE_OS::free ((void *) this->argv_[i]);      delete [] this->argv_;      this->argv_ = 0;    }  delete [] this->buf_;  this->buf_ = 0;  return 0;}
开发者ID:GlassFace,项目名称:sunwell,代码行数:48,


示例11: rapi_release

// Close the RAPI QoS Session.intACE_RAPI_Session::close (void){  this->rsvp_error = rapi_release(this->session_id_);  if (rsvp_error == 0)    ACELIB_ERROR_RETURN ((LM_ERROR,                       "Can't release RSVP session:/n/t%s/n",                       rapi_errlist[rsvp_error]),                      -1);  else    ACELIB_DEBUG ((LM_DEBUG,                "rapi session with id %d released successfully./n",                this->session_id_));  return 0;}
开发者ID:AtVirus,项目名称:SkyFireEMU,代码行数:17,


示例12: ACELIB_ERROR_RETURN

    size_t    Monitor_Base::count (void) const    {      if (this->data_.type_ == Monitor_Control_Types::MC_GROUP)        {          ACELIB_ERROR_RETURN ((LM_ERROR,                             ACE_TEXT ("count: %s is a monitor group/n"),                             this->name_.c_str ()),                            0UL);        }      ACE_GUARD_RETURN (ACE_SYNCH_MUTEX, guard, this->mutex_, 0UL);      return (this->data_.type_ == Monitor_Control_Types::MC_COUNTER              ? static_cast<size_t> (this->data_.last_)              : this->data_.index_);    }
开发者ID:DOCGroup,项目名称:ACE_TAO,代码行数:17,


示例13: ACELIB_ERROR_RETURN

template <class HANDLER> intACE_Asynch_Connector<HANDLER>::connect (const ACE_INET_Addr & remote_sap,                                        const ACE_INET_Addr & local_sap,                                        int reuse_addr,                                        const void *act){  // Initiate asynchronous connect  if (this->asynch_connect_.connect (ACE_INVALID_HANDLE,                                     remote_sap,                                     local_sap,                                     reuse_addr,                                     act) == -1)    ACELIB_ERROR_RETURN ((LM_ERROR,                       ACE_TEXT ("%p/n"),                       ACE_TEXT ("ACE_Asynch_Connect::connect")),                      -1);  return 0;}
开发者ID:Adeer,项目名称:OregonCore,代码行数:18,


示例14: ACE_TRACE

void *ACE_Sbrk_Memory_Pool::acquire (size_t nbytes,                               size_t &rounded_bytes){  ACE_TRACE ("ACE_Sbrk_Memory_Pool::acquire");  rounded_bytes = this->round_up (nbytes);  // ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("(%P|%t) acquiring more chunks, nbytes = %d, rounded_bytes = %d/n"), nbytes, rounded_bytes));  void *cp = ACE_OS::sbrk (rounded_bytes);  if (cp == MAP_FAILED)    ACELIB_ERROR_RETURN ((LM_ERROR,                       "(%P|%t) cp = %u/n",                       cp),                      0);  else    // ACELIB_DEBUG ((LM_DEBUG,  ACE_TEXT ("(%P|%t) acquired more chunks, nbytes = %d, rounded_bytes = %d, new break = %u/n"), nbytes, rounded_bytes, cp));  return cp;}
开发者ID:GlassFace,项目名称:sunwell,代码行数:18,


示例15: ACE_NEW_RETURN

rapi_flowspec_t *ACE_RAPI_Session::init_flowspec_simplified(const ACE_Flow_Spec &flow_spec){  rapi_flowspec_t *flowsp;  ACE_NEW_RETURN (flowsp,                  rapi_flowspec_t,                  0);  // Extended Legacy format.  qos_flowspecx_t *csxp = &flowsp->specbody_qosx;  // Choose based on the service type : [QOS_GUARANTEEDX/QOS_CNTR_LOAD].  switch (flow_spec.service_type ())    {    case QOS_GUARANTEEDX:      csxp->xspec_R = 0 ; // Guaranteed Rate B/s. @@How does this map to the                          // ACE Flow Spec Parameters.      csxp->xspec_S = flow_spec.delay_variation () ; // Slack term in MICROSECONDS      // Note there is no break !!    case QOS_CNTR_LOAD:      csxp->spec_type = flow_spec.service_type ();        // qos_service_type      csxp->xspec_r = flow_spec.token_rate ();            // Token Bucket Average Rate (B/s)      csxp->xspec_b = flow_spec.token_bucket_size ();     // Token Bucket Rate (B)      csxp->xspec_p = flow_spec.peak_bandwidth ();        // Peak Data Rate (B/s)      csxp->xspec_m = flow_spec.minimum_policed_size ();  // Minimum Policed Unit (B)      csxp->xspec_M = flow_spec.max_sdu_size();          // Max Packet Size (B)      flowsp->form = RAPI_FLOWSTYPE_Simplified;      break;    default:      ACELIB_ERROR_RETURN ((LM_ERROR,                         "(%N|%l) Unknown flowspec type: %u/n",flow_spec.service_type () ),                        0);    }  flowsp->len = sizeof(rapi_flowspec_t);  return flowsp;}
开发者ID:AtVirus,项目名称:SkyFireEMU,代码行数:44,


示例16: ACE_UNUSED_ARG

intACE_Registry_Name_Space::list_name_entries (ACE_BINDING_SET &set,                                            const ACE_NS_WString &pattern){  ACE_UNUSED_ARG(pattern);  ACE_Registry::Binding_List list;  int result = this->context_.list (list);  if (result != 0)    return result;  // Iterator through all entries  for (ACE_Registry::Binding_List::iterator i = list.begin ();       i != list.end ();       i++)    {      // Yeeesss! STL rules!      ACE_Registry::Binding &binding = *i;      if (binding.type () == ACE_Registry::OBJECT)        {          // Key          ACE_TString string = binding.name ();          ACE_NS_WString key (string.c_str ());          // Value          ACE_NS_WString value;          char *type = 0;          result = this->resolve (key,                                  value,                                  type);          if (result != 0)            ACELIB_ERROR_RETURN ((LM_ERROR,                              ACE_TEXT ("%p/n"),                              ACE_TEXT ("ACE_Registry::Naming_Context::resolve")),                              result);          // Complete binding          ACE_Name_Binding binding (key, value, type);          set.insert (binding);        }    }  return 0;}
开发者ID:CCJY,项目名称:ACE,代码行数:44,


示例17: ACE_TRACE

intACE_Token_Collection::insert (ACE_Token_Proxy &new_token){  ACE_TRACE ("ACE_Token_Collection::insert");  TOKEN_NAME name (new_token.name ());  // Check if the new_proxy is already in the list.  if (collection_.find (name) == 1)    // One already exists, so fail.    return -1;  // Clone the new token.  ACE_Token_Proxy *temp = new_token.clone ();  if (collection_.bind (name, temp) == -1)    ACELIB_ERROR_RETURN ((LM_ERROR, ACE_TEXT ("bind failed/n")), -1);  return 0;}
开发者ID:GlassFace,项目名称:sunwell,代码行数:19,


示例18: ACE_UNUSED_ARG

intACE_Shared_Memory_Pool::find_seg (const void* const searchPtr,                                  ACE_OFF_T &offset,                                  size_t &counter){#ifndef ACE_HAS_SYSV_IPC  ACE_UNUSED_ARG (searchPtr);  ACE_UNUSED_ARG (offset);  ACE_UNUSED_ARG (counter);  ACE_NOTSUP_RETURN (-1);#else  offset = 0;  SHM_TABLE *st = reinterpret_cast<SHM_TABLE *> (this->base_addr_);  shmid_ds buf;  for (counter = 0;       counter < this->max_segments_         && st[counter].used_ == 1;       counter++)    {      if (ACE_OS::shmctl (st[counter].shmid_, IPC_STAT, &buf) == -1)        ACELIB_ERROR_RETURN ((LM_ERROR,                           ACE_TEXT ("(%P|%t) %p/n"),                           ACE_TEXT ("shmctl")),                          -1);      offset += buf.shm_segsz;      // If segment 'counter' starts at a location greater than the      // place we are searching for. We then decrement the offset to      // the start of counter-1. ([email
C++ ACE_ALLOCATOR_RETURN函数代码示例
C++ ACELIB_ERROR函数代码示例
51自学网自学EXCEL、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。
京ICP备13026421号-1