#include <MEM_IO.h>
Collaboration diagram for ACE_MT_MEM_IO::Simple_Queue:

Public Member Functions | |
| Simple_Queue (void) | |
| Simple_Queue (MQ_Struct *mq) | |
| int | init (MQ_Struct *mq, ACE_MEM_SAP::MALLOC_TYPE *malloc) |
| int | write (ACE_MEM_SAP_Node *new_msg) |
| ACE_MEM_SAP_Node * | read (void) |
Private Attributes | |
| MQ_Struct * | mq_ |
| ACE_MEM_SAP::MALLOC_TYPE * | malloc_ |
|
|
Definition at line 15 of file MEM_IO.inl.
|
|
|
Definition at line 31 of file MEM_IO.inl.
|
|
||||||||||||
|
Definition at line 38 of file MEM_IO.inl. References ACE_MEM_SAP::MALLOC_TYPE, and mq_. Referenced by ACE_MT_MEM_IO::init().
|
|
|
Definition at line 119 of file MEM_IO.cpp. References ACE_SEH_EXCEPT, ACE_SEH_TRY, ACE_MT_MEM_IO::MQ_Struct::head_, mq_, ACE_MEM_SAP_Node::next_, and ACE_MT_MEM_IO::MQ_Struct::tail_. Referenced by ACE_MT_MEM_IO::recv_buf().
00120 {
00121 if (this->mq_ == 0)
00122 return 0;
00123
00124 ACE_MEM_SAP_Node *retv = 0;
00125
00126 ACE_SEH_TRY
00127 {
00128 retv = this->mq_->head_;
00129 // Here, we assume we already have acquired the lock necessary
00130 // and there are soemthing in the queue.
00131 if (this->mq_->head_ == this->mq_->tail_)
00132 {
00133 // Last message in the queue.
00134 this->mq_->head_ = 0;
00135 this->mq_->tail_ = 0;
00136 }
00137 else
00138 this->mq_->head_ = retv->next_;
00139 }
00140 ACE_SEH_EXCEPT (this->malloc_->memory_pool ().seh_selector (GetExceptionInformation ()))
00141 {
00142 }
00143
00144 return retv;
00145 }
|
|
|
Definition at line 96 of file MEM_IO.cpp. References ACE_Based_Pointer_Basic< CONCRETE >::addr(), ACE_MT_MEM_IO::MQ_Struct::head_, mq_, ACE_MEM_SAP_Node::next_, and ACE_MT_MEM_IO::MQ_Struct::tail_. Referenced by ACE_MT_MEM_IO::send_buf().
00097 {
00098 if (this->mq_ == 0)
00099 return -1;
00100
00101 // Here, we assume we already have acquired the lock necessary.
00102 // And we are allowed to write.
00103 if (this->mq_->tail_.addr () == 0) // nothing in the queue.
00104 {
00105 this->mq_->head_ = new_node;
00106 this->mq_->tail_ = new_node;
00107 new_node->next_ = 0;
00108 }
00109 else
00110 {
00111 this->mq_->tail_->next_ = new_node;
00112 new_node->next_ = 0;
00113 this->mq_->tail_ = new_node;
00114 }
00115 return 0;
00116 }
|
|
|
|
|
|
|
1.3.6