本文整理匯總了C++中ACE_NEW_NORETURN函數的典型用法代碼示例。如果您正苦於以下問題:C++ ACE_NEW_NORETURN函數的具體用法?C++ ACE_NEW_NORETURN怎麽用?C++ ACE_NEW_NORETURN使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了ACE_NEW_NORETURN函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: proactor
void AIO_Input_Handler::open
(ACE_HANDLE new_handle, ACE_Message_Block &) {
reader_.open (*this, new_handle, 0, proactor ());
ACE_NEW_NORETURN
(mblk_, ACE_Message_Block (ACE_DEFAULT_CDR_BUFSIZE));
// Align the Message Block for a CDR stream
ACE_CDR::mb_align (mblk_);
reader_.read (*mblk_, LOG_HEADER_SIZE);
}
示例2: ACE_DEBUG
//***************************************************************************
//
// Method: handle_read_file
//
// Description: Callback used when a read completes
//
// Inputs: read file result structure containing message block
//
// Returns: none
//
//***************************************************************************
void
FileIOHandler::handle_read_file(const ACE_Asynch_Read_File::Result &result)
{
ACE_Message_Block &mb = result.message_block();
// If the read failed, queue up another one using the same message block
if (!result.success() || result.bytes_transferred() == 0)
{
//ACE_DEBUG((LM_INFO, ACE_TEXT("FileIOHandler receive timeout.\n")));
reader_.read(mb,
mb.space(),
result.offset () + result.bytes_transferred ());
}
else
{
// We have a message block with some read data in it. Send it onward
ACE_DEBUG((LM_INFO, ACE_TEXT("FileIOHandler received %d bytes of data at offset %d\n"),
result.bytes_transferred(), result.offset ()));
// TODO: Process this data in some meaningful way
if (result.offset () != (unsigned long)*reinterpret_cast<unsigned char*> (mb.rd_ptr ()))
{
ACE_DEBUG((LM_ERROR, ACE_TEXT("FileIOHandler received incorrect data: got [%u] expected [%u]\n"),
*reinterpret_cast<unsigned char*> (mb.rd_ptr ()), result.offset ()));
}
// Release the message block when we're done with it
mb.release();
if ((result.offset () + result.bytes_transferred ()) < 256)
{
// Our processing is done; prime the read process again
ACE_Message_Block *new_mb;
ACE_NEW_NORETURN(new_mb, ACE_Message_Block(FILE_FRAME_SIZE));
if (reader_.read(*new_mb, new_mb->space(),
result.offset () + result.bytes_transferred ()) != 0)
{
int errnr = ACE_OS::last_error ();
ACE_DEBUG(
(LM_INFO, ACE_TEXT("%p [%d]\n"), ACE_TEXT("FileIOHandler continuing read failed"), errnr));
new_mb->release();
#if defined (ACE_WIN32)
this->read_pending_ = false;
}
else
{
this->read_pending_ = true;
#endif
}
}
else
{
// we have it all; stop the proactor
ACE_Proactor::instance ()->proactor_end_event_loop ();
}
}
}
示例3: RPG_TRACE
bool
RPG_Net_Protocol_Module_IRCSplitter::putStatisticsMessage (const RPG_Net_Protocol_RuntimeStatistic& info_in,
const ACE_Time_Value& collectionTime_in) const
{
RPG_TRACE (ACE_TEXT ("RPG_Net_Protocol_Module_IRCSplitter::putStatisticsMessage"));
// step1: initialize session data
RPG_Net_Protocol_SessionData* data_p = NULL;
ACE_NEW_NORETURN (data_p,
RPG_Net_Protocol_SessionData);
if (!data_p)
{
ACE_DEBUG ((LM_CRITICAL,
ACE_TEXT ("failed to allocate memory: \"%m\", aborting\n")));
return false;
} // end IF
//ACE_OS::memset (data_p, 0, sizeof (RPG_Net_Protocol_SessionData));
data_p->currentStatistics = info_in;
data_p->lastCollectionTimestamp = collectionTime_in;
// step2: allocate session data container
RPG_Net_Protocol_StreamSessionData_t* session_data_p = NULL;
ACE_NEW_NORETURN (session_data_p,
RPG_Net_Protocol_StreamSessionData_t (data_p,
true));
if (!session_data_p)
{
ACE_DEBUG ((LM_CRITICAL,
ACE_TEXT ("failed to allocate memory: \"%m\", aborting\n")));
// clean up
delete data_p;
return false;
} // end IF
// step3: send the data downstream...
// *NOTE*: "fire-and-forget"-API for session_data_p
ACE_ASSERT (inherited::state_);
return inherited::putSessionMessage (SESSION_STATISTICS,
session_data_p,
inherited::allocator_);
}
示例4: ACE_NEW_NORETURN
void ProactorService::PostRecv()
{
ACE_Message_Block* pBlock;
ACE_NEW_NORETURN(pBlock, ACE_Message_Block (2048));
if(this->m_AsyncReader.read(*pBlock, pBlock->space()) != 0)
{
pBlock->release();
ReserveClose();
}
}
示例5: create_VTopics_Sender_Impl
extern "C" SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
create_VTopics_Sender_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
ACE_NEW_NORETURN (
retval,
Sender_exec_i);
return retval;
}
示例6: create_InterInArgsT_Sender_Impl
extern "C" INTERINARGS_T_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
create_InterInArgsT_Sender_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
ACE_NEW_NORETURN (
retval,
Sender_exec_i);
return retval;
}
示例7: ACE_TRACE
template <ACE_SYNCH_DECL, class TIME_POLICY> int
ACE_Stream<ACE_SYNCH_USE, TIME_POLICY>::control (ACE_IO_Cntl_Msg::ACE_IO_Cntl_Cmds cmd,
void *a)
{
ACE_TRACE ("ACE_Stream<ACE_SYNCH_USE, TIME_POLICY>::control");
ACE_IO_Cntl_Msg ioc (cmd);
ACE_Message_Block *db = 0;
// Try to create a data block that contains the user-supplied data.
ACE_NEW_RETURN (db,
ACE_Message_Block (sizeof (int),
ACE_Message_Block::MB_IOCTL,
0,
(char *) a),
-1);
// Try to create a control block <cb> that contains the control
// field and a pointer to the data block <db> in <cb>'s continuation
// field.
ACE_Message_Block *cb = 0;
ACE_NEW_NORETURN (cb,
ACE_Message_Block (sizeof ioc,
ACE_Message_Block::MB_IOCTL,
db,
(char *) &ioc));
// @@ Michael: The old semantic assumed that cb returns == 0
// if no memory was available. We will now return immediately
// without release (errno is set to ENOMEM by the macro).
// If we can't allocate <cb> then we need to delete db and return
// -1.
if (cb == 0)
{
db->release ();
errno = ENOMEM;
return -1;
}
int result;
if (this->stream_head_->writer ()->put (cb) == -1)
result = -1;
else if (this->stream_head_->reader ()->getq (cb) == -1)
result = -1;
else
result = ((ACE_IO_Cntl_Msg *) cb->rd_ptr ())->rval ();
// This will also release db if it's reference count == 0.
cb->release ();
return result;
}
示例8: create_Shapes_Controller_Impl
extern "C" CONTROLLER_EXEC_Export ::Components::EnterpriseComponent_ptr
create_Shapes_Controller_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
ACE_NEW_NORETURN (
retval,
Controller_exec_i);
return retval;
}
示例9: create_Hello_Sender_comp_Impl
extern "C" HELLO_SENDER_COMP_EXEC_Export ::Components::EnterpriseComponent_ptr
create_Hello_Sender_comp_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
ACE_NEW_NORETURN (
retval,
Sender_comp_exec_i);
return retval;
}
示例10: create_Launch_Failure_Home_Impl
extern "C" LAUNCH_FAILURE_EXEC_Export ::Components::HomeExecutorBase_ptr
create_Launch_Failure_Home_Impl (void)
{
::Components::HomeExecutorBase_ptr retval =
::Components::HomeExecutorBase::_nil ();
ACE_NEW_NORETURN (
retval,
Launch_Failure_Home_exec_i);
return retval;
}
示例11: create_Shapes_Receiver_comp_Impl
extern "C" SHAPES_RECEIVER_COMP_EXEC_Export ::Components::EnterpriseComponent_ptr
create_Shapes_Receiver_comp_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
ACE_NEW_NORETURN (
retval,
Receiver_comp_exec_i);
return retval;
}
示例12: create_DelReplyH_Receiver_Impl
extern "C" ::Components::EnterpriseComponent_ptr
create_DelReplyH_Receiver_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
ACE_NEW_NORETURN (
retval,
Receiver_exec_i);
return retval;
}
示例13: create_UsesMulti_Sender_Impl
extern "C" USESMULTI_SENDER_EXEC_Export ::Components::EnterpriseComponent_ptr
create_UsesMulti_Sender_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
ACE_NEW_NORETURN (
retval,
Sender_exec_i);
return retval;
}
示例14: create_MLD_TypeRegistration_Test_CFTTestComponent_Impl
extern "C" COMPONENT_EXEC_Export ::Components::EnterpriseComponent_ptr
create_MLD_TypeRegistration_Test_CFTTestComponent_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
ACE_NEW_NORETURN (
retval,
CFTTestComponent_exec_i);
return retval;
}
示例15: create_Launch_Failure_Impl
extern "C" LAUNCH_FAILURE_EXEC_Export ::Components::EnterpriseComponent_ptr
create_Launch_Failure_Impl (void)
{
::Components::EnterpriseComponent_ptr retval =
::Components::EnterpriseComponent::_nil ();
ACE_NEW_NORETURN (
retval,
Launch_Failure_exec_i);
return retval;
}