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

Public Methods | |
| ACE_INLINE_FOR_GNUC | 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 13 of file MEM_IO.i.
|
|
|
Definition at line 29 of file MEM_IO.i.
|
|
||||||||||||
|
Definition at line 36 of file MEM_IO.i. References malloc_, 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, mq_, and ACE_MEM_SAP_Node::next_. 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 mq_, and ACE_MEM_SAP_Node::next_. 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 }
|
|
|
Definition at line 93 of file MEM_IO.h. Referenced by init. |
|
|
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002