Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

Message_Block.cpp

Go to the documentation of this file.
00001 #include "ace_pch.h"
00002 #include "ace/Message_Block.h"
00003 #include "ace/Log_Msg.h"
00004 #include "ace/Malloc_Base.h"
00005 #include "ace/Synch_T.h"
00006 
00007 //#define ACE_ENABLE_TIMEPROBES
00008 #include "ace/Timeprobe.h"
00009 
00010 #if !defined (__ACE_INLINE__)
00011 #include "ace/Message_Block.i"
00012 #endif /* __ACE_INLINE__ */
00013 
00014 ACE_RCSID (ace,
00015            Message_Block,
00016            "$Id: Message_Block.cpp,v 1.1.1.4.2.1 2003/03/13 19:44:21 chad Exp $")
00017 
00018 ACE_ALLOC_HOOK_DEFINE (ACE_Message_Block)
00019 
00020 #if defined (ACE_ENABLE_TIMEPROBES)
00021 
00022 static const char *ACE_MB_Timeprobe_Description[] =
00023 {
00024   "Message_Block::init_i - enter",
00025   "Message_Block::init_i - leave",
00026   "Message_Block::init_i - db alloc",
00027   "Message_Block::init_i - db ctor",
00028   "Data_Block::ctor[1] - enter",
00029   "Data_Block::ctor[1] - leave",
00030   "Data_Block::ctor[2] - enter",
00031   "Data_Block::ctor[2] - leave",
00032   "Data_Block::clone - enter",
00033   "Data_Block::clone - leave"
00034 };
00035 
00036 enum
00037 {
00038   ACE_MESSAGE_BLOCK_INIT_I_ENTER = 3000,
00039   ACE_MESSAGE_BLOCK_INIT_I_LEAVE,
00040   ACE_MESSAGE_BLOCK_INIT_I_DB_ALLOC,
00041   ACE_MESSAGE_BLOCK_INIT_I_DB_CTOR,
00042   ACE_DATA_BLOCK_CTOR1_ENTER,
00043   ACE_DATA_BLOCK_CTOR1_LEAVE,
00044   ACE_DATA_BLOCK_CTOR2_ENTER,
00045   ACE_DATA_BLOCK_CTOR2_LEAVE,
00046   ACE_DATA_BLOCK_CLONE_ENTER,
00047   ACE_DATA_BLOCK_CLONE_LEAVE
00048 };
00049 
00050 
00051 // Setup Timeprobes
00052 ACE_TIMEPROBE_EVENT_DESCRIPTIONS (ACE_MB_Timeprobe_Description,
00053                                   ACE_MESSAGE_BLOCK_INIT_I_ENTER);
00054 
00055 #endif /* ACE_ENABLE_TIMEPROBES */
00056 
00057 void
00058 ACE_Message_Block::data_block (ACE_Data_Block *db)
00059 {
00060   ACE_TRACE ("ACE_Message_Block::data_block");
00061   if (ACE_BIT_DISABLED (this->flags_,
00062                         ACE_Message_Block::DONT_DELETE)
00063       && this->data_block_ != 0)
00064     this->data_block_->release ();
00065 
00066   this->data_block_ = db;
00067 
00068   // Set the read and write pointers in the <Message_Block> to point
00069   // to the buffer in the <ACE_Data_Block>.
00070   this->rd_ptr (this->data_block ()->base ());
00071   this->wr_ptr (this->data_block ()->base ());
00072 }
00073 
00074 int
00075 ACE_Message_Block::copy (const char *buf, size_t n)
00076 {
00077   ACE_TRACE ("ACE_Message_Block::copy");
00078 
00079   /*size_t len = ACE_static_cast(size_t,
00080     this->end () - this->wr_ptr ());*/
00081   // Note that for this to work correct, end () *must* be >= mark ().
00082   size_t len = this->space ();
00083 
00084   if (len < n)
00085     return -1;
00086   else
00087     {
00088       (void) ACE_OS::memcpy (this->wr_ptr (),
00089                              buf,
00090                              n);
00091       this->wr_ptr (n);
00092       return 0;
00093     }
00094 }
00095 
00096 int
00097 ACE_Message_Block::copy (const char *buf)
00098 {
00099   ACE_TRACE ("ACE_Message_Block::copy");
00100 
00101   /* size_t len = ACE_static_cast(size_t,
00102      (this->end () - this->wr_ptr ())); */
00103   // Note that for this to work correct, end() *must* be >= wr_ptr().
00104   size_t len = this->space ();
00105 
00106   size_t buflen = ACE_OS::strlen (buf) + 1;
00107 
00108   if (len < buflen)
00109     return -1;
00110   else
00111     {
00112       (void) ACE_OS::memcpy (this->wr_ptr (),
00113                              buf,
00114                              buflen);
00115       this->wr_ptr (buflen);
00116       return 0;
00117     }
00118 }
00119 
00120 void
00121 ACE_Message_Block::crunch (void)
00122 {
00123   if (this->rd_ptr () > this->base ())
00124     {
00125       size_t len = this->length ();
00126       (void) ACE_OS::memmove (this->base (),
00127                               this->rd_ptr (),
00128                               len);
00129       this->rd_ptr (this->base ());
00130       this->wr_ptr (this->base () + len);
00131     }
00132 }
00133 
00134 void
00135 ACE_Data_Block::dump (void) const
00136 {
00137   ACE_TRACE ("ACE_Data_Block::dump");
00138   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00139   ACE_DEBUG ((LM_DEBUG,
00140               ACE_LIB_TEXT ("-----( Data Block )-----\n")
00141               ACE_LIB_TEXT ("type_ = %d\n")
00142               ACE_LIB_TEXT ("cur_size_ = %u\n")
00143               ACE_LIB_TEXT ("max_size_ = %u\n")
00144               ACE_LIB_TEXT ("flags_ = %u\n")
00145               ACE_LIB_TEXT ("base_ = %u\n")
00146               ACE_LIB_TEXT ("locking_strategy_ = %u\n")
00147               ACE_LIB_TEXT ("reference_count_ = %u\n")
00148               ACE_LIB_TEXT ("---------------------------\n"),
00149               this->type_,
00150               this->cur_size_,
00151               this->max_size_,
00152               this->flags_,
00153               this->base_,
00154               this->locking_strategy_,
00155               this->reference_count_));
00156   this->allocator_strategy_->dump ();
00157   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00158 }
00159 
00160 void
00161 ACE_Message_Block::dump (void) const
00162 {
00163   ACE_TRACE ("ACE_Message_Block::dump");
00164   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
00165   ACE_DEBUG ((LM_DEBUG,
00166               ACE_LIB_TEXT ("-----( Message Block )-----\n")
00167               ACE_LIB_TEXT ("priority_ = %d\n")
00168               ACE_LIB_TEXT ("next_ = %u\n")
00169               ACE_LIB_TEXT ("prev_ = %u\n")
00170               ACE_LIB_TEXT ("cont_ = %u\n")
00171               ACE_LIB_TEXT ("rd_ptr_ = %u\n")
00172               ACE_LIB_TEXT ("wr_ptr_ = %u\n")
00173               ACE_LIB_TEXT ("---------------------------\n"),
00174               this->priority_,
00175               this->next_,
00176               this->prev_,
00177               this->cont_,
00178               this->rd_ptr_,
00179               this->wr_ptr_));
00180   this->data_block ()->dump ();
00181   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
00182 }
00183 
00184 int
00185 ACE_Data_Block::size (size_t length)
00186 {
00187   ACE_TRACE ("ACE_Data_Block::size");
00188 
00189   if (length <= this->max_size_)
00190     this->cur_size_ = length;
00191   else
00192     {
00193       // We need to resize!
00194       char *buf;
00195       ACE_ALLOCATOR_RETURN (buf,
00196                             (char *) this->allocator_strategy_->malloc (length),
00197                             -1);
00198 
00199       ACE_OS::memcpy (buf,
00200                       this->base_,
00201                       this->cur_size_);
00202       if (ACE_BIT_DISABLED (this->flags_,
00203                             ACE_Message_Block::DONT_DELETE))
00204         this->allocator_strategy_->free ((void *) this->base_);
00205       else
00206         // We now assume ownership.
00207         ACE_CLR_BITS (this->flags_,
00208                       ACE_Message_Block::DONT_DELETE);
00209       this->max_size_ = length;
00210       this->cur_size_ = length;
00211       this->base_ = buf;
00212     }
00213   return 0;
00214 }
00215 
00216 int
00217 ACE_Message_Block::size (size_t length)
00218 {
00219   ACE_TRACE ("ACE_Message_Block::size");
00220 
00221   // Resize the underlying <ACE_Data_Block>.
00222   if (this->data_block ()->size (length) == -1)
00223     return -1;
00224 
00225   return 0;
00226 }
00227 
00228 void
00229 ACE_Message_Block::total_size_and_length (size_t &mb_size,
00230                                           size_t &mb_length) const
00231 {
00232   ACE_TRACE ("ACE_Message_Block::total_size_and_length");
00233 
00234   for (const ACE_Message_Block *i = this;
00235        i != 0;
00236        i = i->cont ())
00237     {
00238       mb_size += i->size ();
00239       mb_length += i->length ();
00240     }
00241 }
00242 
00243 size_t
00244 ACE_Message_Block::total_size (void) const
00245 {
00246   ACE_TRACE ("ACE_Message_Block::total_size");
00247 
00248   size_t size = 0;
00249   for (const ACE_Message_Block *i = this;
00250        i != 0;
00251        i = i->cont ())
00252     size += i->size ();
00253 
00254   return size;
00255 }
00256 
00257 size_t
00258 ACE_Message_Block::total_length (void) const
00259 {
00260   ACE_TRACE ("ACE_Message_Block::total_length");
00261 
00262   size_t length = 0;
00263   for (const ACE_Message_Block *i = this;
00264        i != 0;
00265        i = i->cont ())
00266     length += i->length ();
00267 
00268   return length;
00269 }
00270 
00271 size_t
00272 ACE_Message_Block::total_capacity (void) const
00273 {
00274   ACE_TRACE ("ACE_Message_Block::total_capacity");
00275 
00276   size_t size = 0;
00277 
00278   for (const ACE_Message_Block *i = this;
00279        i != 0;
00280        i = i->cont ())
00281     size += i->capacity ();
00282 
00283   return size;
00284 }
00285 
00286 ACE_Data_Block::ACE_Data_Block (void)
00287   : type_ (ACE_Message_Block::MB_DATA),
00288     cur_size_ (0),
00289     max_size_ (0),
00290     flags_ (ACE_Message_Block::DONT_DELETE),
00291     base_ (0),
00292     allocator_strategy_ (0),
00293     locking_strategy_ (0),
00294     reference_count_ (1),
00295     data_block_allocator_ (0)
00296 {
00297   ACE_TRACE ("ACE_Data_Block::ACE_Data_Block");
00298   ACE_FUNCTION_TIMEPROBE (ACE_DATA_BLOCK_CTOR1_ENTER);
00299 
00300   ACE_ALLOCATOR (this->allocator_strategy_,
00301                  ACE_Allocator::instance ());
00302 
00303   ACE_ALLOCATOR (this->data_block_allocator_,
00304                  ACE_Allocator::instance ());
00305 }
00306 
00307 ACE_Data_Block::ACE_Data_Block (size_t size,
00308                                 ACE_Message_Block::ACE_Message_Type msg_type,
00309                                 const char *msg_data,
00310                                 ACE_Allocator *allocator_strategy,
00311                                 ACE_Lock *locking_strategy,
00312                                 ACE_Message_Block::Message_Flags flags,
00313                                 ACE_Allocator *data_block_allocator)
00314   : type_ (msg_type),
00315     cur_size_ (0),          // Reset later if memory alloc'd ok
00316     max_size_ (0),
00317     flags_ (flags),
00318     base_ ((char *) msg_data),
00319     allocator_strategy_ (allocator_strategy),
00320     locking_strategy_ (locking_strategy),
00321     reference_count_ (1),
00322     data_block_allocator_ (data_block_allocator)
00323 {
00324   ACE_TRACE ("ACE_Data_Block::ACE_Data_Block");
00325   ACE_FUNCTION_TIMEPROBE (ACE_DATA_BLOCK_CTOR2_ENTER);
00326 
00327   // If the user didn't pass one in, let's use the
00328   // <ACE_Allocator::instance>.
00329   if (this->allocator_strategy_ == 0)
00330     ACE_ALLOCATOR (this->allocator_strategy_,
00331                    ACE_Allocator::instance ());
00332 
00333   if (this->data_block_allocator_ == 0)
00334     ACE_ALLOCATOR (this->data_block_allocator_,
00335                    ACE_Allocator::instance ());
00336 
00337   if (msg_data == 0)
00338     ACE_ALLOCATOR (this->base_,
00339                    (char *) this->allocator_strategy_->malloc (size));
00340     // ACE_ALLOCATOR returns on alloc failure...
00341 
00342   // The memory is legit, whether passed in or allocated, so set the size.
00343   this->cur_size_ = this->max_size_ = size;
00344 }
00345 
00346 ACE_Message_Block::ACE_Message_Block (const char *data,
00347                                       size_t size,
00348                                       u_long priority)
00349   : flags_ (0),
00350     data_block_ (0)
00351 {
00352   ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
00353 
00354   if (this->init_i (size,    // size
00355                     MB_DATA, // type
00356                     0,       // cont
00357                     data,    // data
00358                     0,       // allocator
00359                     0,       // locking strategy
00360                     ACE_Message_Block::DONT_DELETE, // flags
00361                     priority, // priority
00362                     ACE_Time_Value::zero,     // execution time
00363                     ACE_Time_Value::max_time, // absolute time of deadline
00364                     0,  // data block
00365                     0,  // data_block allocator
00366                     0) == -1) // message_block allocator
00367     ACE_ERROR ((LM_ERROR,
00368                 ACE_LIB_TEXT ("ACE_Message_Block")));
00369 }
00370 
00371 ACE_Message_Block::ACE_Message_Block (ACE_Allocator *message_block_allocator)
00372   : flags_ (0),
00373     data_block_ (0)
00374 {
00375   ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
00376 
00377   if (this->init_i (0,       // size
00378                     MB_DATA, // type
00379                     0,       // cont
00380                     0,       // data
00381                     0,       // allocator
00382                     0,       // locking strategy
00383                     ACE_Message_Block::DONT_DELETE, // flags
00384                     0, // priority
00385                     ACE_Time_Value::zero,     // execution time
00386                     ACE_Time_Value::max_time, // absolute time of deadline
00387                     0, // data block
00388                     0, // data_block allocator
00389                     message_block_allocator) == -1) // message_block allocator
00390     ACE_ERROR ((LM_ERROR,
00391                 ACE_LIB_TEXT ("ACE_Message_Block")));
00392 }
00393 
00394 ACE_Message_Block::ACE_Message_Block (size_t size,
00395                                       ACE_Message_Type msg_type,
00396                                       ACE_Message_Block *msg_cont,
00397                                       const char *msg_data,
00398                                       ACE_Allocator *allocator_strategy,
00399                                       ACE_Lock *locking_strategy,
00400                                       u_long priority,
00401                                       const ACE_Time_Value &execution_time,
00402                                       const ACE_Time_Value &deadline_time,
00403                                       ACE_Allocator *data_block_allocator,
00404                                       ACE_Allocator *message_block_allocator)
00405   :flags_ (0),
00406    data_block_ (0)
00407 {
00408   ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
00409 
00410   if (this->init_i (size,
00411                     msg_type,
00412                     msg_cont,
00413                     msg_data,
00414                     allocator_strategy,
00415                     locking_strategy,
00416                     msg_data ? ACE_Message_Block::DONT_DELETE : 0,
00417                     priority,
00418                     execution_time,
00419                     deadline_time,
00420                     0, // data block
00421                     data_block_allocator,
00422                     message_block_allocator) == -1)
00423     ACE_ERROR ((LM_ERROR,
00424                 ACE_LIB_TEXT ("ACE_Message_Block")));
00425 }
00426 
00427 int
00428 ACE_Message_Block::init (size_t size,
00429                          ACE_Message_Type msg_type,
00430                          ACE_Message_Block *msg_cont,
00431                          const char *msg_data,
00432                          ACE_Allocator *allocator_strategy,
00433                          ACE_Lock *locking_strategy,
00434                          u_long priority,
00435                          const ACE_Time_Value &execution_time,
00436                          const ACE_Time_Value &deadline_time,
00437                          ACE_Allocator *data_block_allocator,
00438                          ACE_Allocator *message_block_allocator)
00439 {
00440   ACE_TRACE ("ACE_Message_Block::init");
00441 
00442   return this->init_i (size,
00443                        msg_type,
00444                        msg_cont,
00445                        msg_data,
00446                        allocator_strategy,
00447                        locking_strategy,
00448                        msg_data ? ACE_Message_Block::DONT_DELETE : 0,
00449                        priority,
00450                        execution_time,
00451                        deadline_time,
00452                        0,  // data block
00453                        data_block_allocator,
00454                        message_block_allocator);
00455 }
00456 
00457 int
00458 ACE_Message_Block::init (const char *data,
00459                          size_t size)
00460 {
00461   ACE_TRACE ("ACE_Message_Block::init");
00462   // Should we also initialize all the other fields, as well?
00463 
00464   return this->init_i (size,    // size
00465                        MB_DATA, // type
00466                        0,       // cont
00467                        data,    // data
00468                        0,       // allocator
00469                        0,       // locking strategy
00470                        ACE_Message_Block::DONT_DELETE,  // flags
00471                        0,  // priority
00472                        ACE_Time_Value::zero,     // execution time
00473                        ACE_Time_Value::max_time, // absolute time of deadline
00474                        0,  // data block
00475                        0,  // data_block allocator
00476                        0); // message_block allocator
00477 }
00478 
00479 ACE_Message_Block::ACE_Message_Block (size_t size,
00480                                       ACE_Message_Type msg_type,
00481                                       ACE_Message_Block *msg_cont,
00482                                       const char *msg_data,
00483                                       ACE_Allocator *allocator_strategy,
00484                                       ACE_Lock *locking_strategy,
00485                                       Message_Flags flags,
00486                                       u_long priority,
00487                                       const ACE_Time_Value &execution_time,
00488                                       const ACE_Time_Value &deadline_time,
00489                                       ACE_Data_Block *db,
00490                                       ACE_Allocator *data_block_allocator,
00491                                       ACE_Allocator *message_block_allocator)
00492   : flags_ (0),
00493     data_block_ (0)
00494 {
00495   ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
00496 
00497   if (this->init_i (size,
00498                     msg_type,
00499                     msg_cont,
00500                     msg_data,
00501                     allocator_strategy,
00502                     locking_strategy,
00503                     flags,
00504                     priority,
00505                     execution_time,
00506                     deadline_time,
00507                     db,
00508                     data_block_allocator,
00509                     message_block_allocator) == -1)
00510     ACE_ERROR ((LM_ERROR,
00511                 ACE_LIB_TEXT ("ACE_Message_Block")));
00512 }
00513 
00514 ACE_Message_Block::ACE_Message_Block (ACE_Data_Block *data_block,
00515                                       ACE_Message_Block::Message_Flags flags,
00516                                       ACE_Allocator *message_block_allocator)
00517   : flags_ (flags),
00518     data_block_ (0)
00519 {
00520   ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
00521 
00522   if (this->init_i (0,         // size
00523                     MB_NORMAL, // type
00524                     0,         // cont
00525                     0,         // data
00526                     0,         // allocator
00527                     0,         // locking strategy
00528                     0,         // flags
00529                     0,         // priority
00530                     ACE_Time_Value::zero,     // execution time
00531                     ACE_Time_Value::max_time, // absolute time of deadline
00532                     data_block, // data block
00533                     data_block->data_block_allocator (),
00534                     message_block_allocator) == -1)
00535     ACE_ERROR ((LM_ERROR,
00536                 ACE_LIB_TEXT ("ACE_Message_Block")));
00537 }
00538 
00539 ACE_Message_Block::ACE_Message_Block (const ACE_Message_Block &mb,
00540                                       size_t align)
00541   :flags_ (0),
00542    data_block_ (0)
00543 {
00544   ACE_TRACE ("ACE_Message_Block::ACE_Message_Block");
00545 
00546   if (ACE_BIT_DISABLED (mb.flags_,
00547                         ACE_Message_Block::DONT_DELETE))
00548     {
00549       if (this->init_i (0,         // size
00550                         MB_NORMAL, // type
00551                         0,         // cont
00552                         0,         // data
00553                         0,         // allocator
00554                         0,         // locking strategy
00555                         0,         // flags
00556                         0,         // priority
00557                         ACE_Time_Value::zero,     // execution time
00558                         ACE_Time_Value::max_time, // absolute time of deadline
00559                         mb.data_block ()->duplicate (), // data block
00560                         mb.data_block ()->data_block_allocator (),
00561                         mb.message_block_allocator_) == -1)
00562         ACE_ERROR ((LM_ERROR,
00563                     ACE_LIB_TEXT ("ACE_Message_Block")));
00564 
00565       // Align ourselves
00566       char *start = ACE_ptr_align_binary (this->base (),
00567                                           align);
00568       // Set our rd & wr pointers
00569       this->rd_ptr (start);
00570       this->wr_ptr (start);
00571 
00572     }
00573   else
00574     {
00575       if (this->init_i (0,         // size
00576                         MB_NORMAL, // type
00577                         0,         // cont
00578                         0,         // data
00579                         0,         // allocator
00580                         0,         // locking strategy
00581                         0,         // flags
00582                         0,         // priority
00583                         ACE_Time_Value::zero,     // execution time
00584                         ACE_Time_Value::max_time, // absolute time of deadline
00585                         mb.data_block ()->clone_nocopy (),// data block
00586                         mb.data_block ()->data_block_allocator (),
00587                         mb.message_block_allocator_) == -1)
00588         ACE_ERROR ((LM_ERROR,
00589                     ACE_LIB_TEXT ("ACE_Message_Block")));
00590 
00591       // Align ourselves
00592       char *start = ACE_ptr_align_binary (this->base (),
00593                                           align);
00594       // Set our rd & wr pointers
00595       this->rd_ptr (start);
00596       this->wr_ptr (start);
00597 
00598       // Get the alignment offset of the incoming ACE_Message_Block
00599       start = ACE_ptr_align_binary (mb.base (),
00600                                     align);
00601 
00602 
00603       // Actual offset for the incoming message block assuming that it
00604       // is also aligned to the same "align" byte
00605       size_t wr_offset = mb.wr_ptr_ - (start - mb.base ());
00606 
00607       // Copy wr_offset amount of data in to <this->data_block>
00608       (void) ACE_OS::memcpy (this->wr_ptr (),
00609                              start,
00610                              wr_offset);
00611 
00612       // Dont move the write pointer, just leave it to the application
00613       // to do what it wants
00614 
00615     }
00616 
00617 
00618 
00619 
00620 }
00621 
00622 int
00623 ACE_Message_Block::init_i (size_t size,
00624                            ACE_Message_Type msg_type,
00625                            ACE_Message_Block *msg_cont,
00626                            const char *msg_data,
00627                            ACE_Allocator *allocator_strategy,
00628                            ACE_Lock *locking_strategy,
00629                            Message_Flags flags,
00630                            u_long priority,
00631                            const ACE_Time_Value &execution_time,
00632                            const ACE_Time_Value &deadline_time,
00633                            ACE_Data_Block *db,
00634                            ACE_Allocator *data_block_allocator,
00635                            ACE_Allocator *message_block_allocator)
00636 {
00637   ACE_TRACE ("ACE_Message_Block::init_i");
00638   ACE_FUNCTION_TIMEPROBE (ACE_MESSAGE_BLOCK_INIT_I_ENTER);
00639 
00640   this->rd_ptr_ = 0;
00641   this->wr_ptr_ = 0;
00642   this->priority_ = priority;
00643 #if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS)
00644   this->execution_time_ = execution_time;
00645   this->deadline_time_ = deadline_time;
00646 #else
00647   ACE_UNUSED_ARG (execution_time);
00648   ACE_UNUSED_ARG (deadline_time);
00649 #endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
00650   this->cont_ = msg_cont;
00651   this->next_ = 0;
00652   this->prev_ = 0;
00653 
00654   this->message_block_allocator_ = message_block_allocator;
00655 
00656   if (this->data_block_ != 0)
00657     {
00658       this->data_block_->release ();
00659       this->data_block_ = 0;
00660     }
00661 
00662   if (db == 0)
00663     {
00664       if (data_block_allocator == 0)
00665         ACE_ALLOCATOR_RETURN (data_block_allocator,
00666                               ACE_Allocator::instance (),
00667                               -1);
00668 
00669       ACE_TIMEPROBE (ACE_MESSAGE_BLOCK_INIT_I_DB_ALLOC);
00670 
00671       // Allocate the <ACE_Data_Block> portion, which is reference
00672       // counted.
00673       ACE_NEW_MALLOC_RETURN (db,
00674                              ACE_static_cast(ACE_Data_Block *,
00675                                data_block_allocator->malloc (sizeof (ACE_Data_Block))),
00676                              ACE_Data_Block (size,
00677                                              msg_type,
00678                                              msg_data,
00679                                              allocator_strategy,
00680                                              locking_strategy,
00681                                              flags,
00682                                              data_block_allocator),
00683                              -1);
00684       ACE_TIMEPROBE (ACE_MESSAGE_BLOCK_INIT_I_DB_CTOR);
00685     }
00686 
00687   // Reset the data_block_ pointer.
00688   this->data_block (db);
00689   // If the data alloc failed, the ACE_Data_Block ctor can't relay
00690   // that directly. Therefore, need to check it explicitly.
00691   if (db->size () < size)
00692     return -1;
00693   return 0;
00694 }
00695 
00696 ACE_Data_Block::~ACE_Data_Block (void)
00697 {
00698   // Sanity check...
00699   ACE_ASSERT (this->reference_count_ <= 1);
00700 
00701   // Just to be safe...
00702   this->reference_count_ = 0;
00703 
00704   if (ACE_BIT_DISABLED (this->flags_,
00705                         ACE_Message_Block::DONT_DELETE))
00706     {
00707       this->allocator_strategy_->free ((void *) this->base_);
00708       this->base_ = 0;
00709     }
00710 }
00711 
00712 ACE_Data_Block *
00713 ACE_Data_Block::release_i (void)
00714 {
00715   ACE_TRACE ("ACE_Data_Block::release_i");
00716 
00717   ACE_ASSERT (this->reference_count_ > 0);
00718 
00719   ACE_Data_Block *result = 0;
00720 
00721   // decrement reference count
00722   this->reference_count_--;
00723 
00724   if (this->reference_count_ == 0)
00725     // this will cause deletion of this
00726     result = 0;
00727   else
00728     result = this;
00729 
00730   return result;
00731 }
00732 
00733 ACE_Data_Block *
00734 ACE_Data_Block::release_no_delete (ACE_Lock *lock)
00735 {
00736   ACE_TRACE ("ACE_Data_Block::release_no_delete");
00737 
00738   ACE_Data_Block *result = 0;
00739   ACE_Lock *lock_to_be_used = 0;
00740 
00741   // Check if we were passed in a lock
00742   if (lock != 0)
00743     {
00744       // Make sure that the lock passed in and our lock are the same
00745       if (lock == this->locking_strategy_)
00746         // In this case no locking is required.
00747         lock_to_be_used = 0;
00748 
00749       // The lock passed in does not match our lock
00750       else
00751         // Lock to be used is our lock
00752         lock_to_be_used = this->locking_strategy_;
00753     }
00754   // This is the case when no lock was passed in
00755   else
00756     // Lock to be used is our lock
00757     lock_to_be_used = this->locking_strategy_;
00758 
00759   // If there's a locking strategy then we need to acquire the lock
00760   // before decrementing the count.
00761   if (lock_to_be_used != 0)
00762     {
00763       ACE_GUARD_RETURN (ACE_Lock, ace_mon, *lock_to_be_used, 0);
00764 
00765       result = this->release_i ();
00766     }
00767   else
00768     result = this->release_i ();
00769 
00770   return result;
00771 }
00772 
00773 ACE_Data_Block *
00774 ACE_Data_Block::release (ACE_Lock *lock)
00775 {
00776   ACE_TRACE ("ACE_Data_Block::release");
00777 
00778   ACE_Allocator *allocator = this->data_block_allocator_;
00779 
00780   ACE_Data_Block *result = this->release_no_delete (lock);
00781 
00782   // We must delete this outside the scope of the locking_strategy_
00783   // since otherwise we'd be trying to "release" through a deleted
00784   // pointer!
00785   if (result == 0)
00786     ACE_DES_FREE (this,
00787                   allocator->free,
00788                   ACE_Data_Block);
00789   return result;
00790 }
00791 
00792 ACE_Message_Block *
00793 ACE_Message_Block::release (void)
00794 {
00795   ACE_TRACE ("ACE_Message_Block::release");
00796 
00797   // We want to hold the data block in a temporary variable because we
00798   // invoked "delete this;" at some point, so using this->data_block_
00799   // could be a bad idea.
00800   ACE_Data_Block *tmp = this->data_block ();
00801 
00802   // This flag is set to 1 when we have to destroy the data_block
00803   int destroy_dblock = 0;
00804 
00805   ACE_Lock *lock = 0;
00806 
00807   // Do we have a valid data block
00808   if (this->data_block ())
00809     {
00810       // Grab the lock that belongs to my data block
00811       lock = this->data_block ()->locking_strategy ();
00812 
00813       // if we have a lock
00814       if (lock != 0)
00815         {
00816           // One guard for all
00817           ACE_GUARD_RETURN (ACE_Lock, ace_mon, *lock, 0);
00818 
00819           // Call non-guarded release with <lock>
00820           destroy_dblock = this->release_i (lock);
00821         }
00822       // This is the case when we have a valid data block but no lock
00823       else
00824         // Call non-guarded release with no lock
00825         destroy_dblock = this->release_i (0);
00826     }
00827   else
00828     // This is the case when we don't even have a valid data block
00829     destroy_dblock = this->release_i (0);
00830 
00831   if (destroy_dblock != 0)
00832     {
00833       ACE_Allocator *allocator = tmp->data_block_allocator ();
00834       ACE_DES_FREE (tmp,
00835                     allocator->free,
00836                     ACE_Data_Block);
00837     }
00838 
00839   return 0;
00840 }
00841 
00842 int
00843 ACE_Message_Block::release_i (ACE_Lock *lock)
00844 {
00845   ACE_TRACE ("ACE_Message_Block::release_i");
00846 
00847   // Free up all the continuation messages.
00848   if (this->cont_)
00849     {
00850       ACE_Message_Block *mb = this->cont_;
00851       ACE_Message_Block *tmp;
00852 
00853       do
00854         {
00855           tmp = mb;
00856           mb = mb->cont_;
00857           tmp->cont_ = 0;
00858 
00859           ACE_Data_Block *db = tmp->data_block ();
00860           if (tmp->release_i (lock) != 0)
00861             {
00862               ACE_Allocator *allocator = db->data_block_allocator ();
00863               ACE_DES_FREE (db,
00864                             allocator->free,
00865                             ACE_Data_Block);
00866             }
00867         }
00868       while (mb);
00869 
00870       this->cont_ = 0;
00871     }
00872 
00873   int result = 0;
00874 
00875   if (ACE_BIT_DISABLED (this->flags_,
00876                         ACE_Message_Block::DONT_DELETE) &&
00877       this->data_block ())
00878     {
00879       if (this->data_block ()->release_no_delete (lock) == 0)
00880         result = 1;
00881       this->data_block_ = 0;
00882     }
00883 
00884   // We will now commit suicide: this object *must* have come from the
00885   // allocator given.
00886   if (this->message_block_allocator_ == 0)
00887     delete this;
00888   else
00889     {
00890       ACE_Allocator *allocator = this->message_block_allocator_;
00891       ACE_DES_FREE (this,
00892                     allocator->free,
00893                     ACE_Message_Block);
00894     }
00895 
00896   return result;
00897 }
00898 
00899 /* static */ ACE_Message_Block *
00900 ACE_Message_Block::release (ACE_Message_Block *mb)
00901 {
00902   ACE_TRACE ("ACE_Message_Block::release");
00903 
00904   if (mb != 0)
00905     return mb->release ();
00906   else
00907     return 0;
00908 }
00909 
00910 ACE_Message_Block::~ACE_Message_Block (void)
00911 {
00912   ACE_TRACE ("ACE_Message_Block::~ACE_Message_Block");
00913 
00914   if (ACE_BIT_DISABLED (this->flags_,
00915                         ACE_Message_Block::DONT_DELETE)&&
00916       this->data_block ())
00917     this->data_block ()->release ();
00918 
00919   this->prev_ = 0;
00920   this->next_ = 0;
00921 }
00922 
00923 ACE_Data_Block *
00924 ACE_Data_Block::duplicate (void)
00925 {
00926   ACE_TRACE ("ACE_Data_Block::duplicate");
00927 
00928   // Create a new <ACE_Message_Block>, but share the <base_> pointer
00929   // data (i.e., don't copy that).
00930   if (this->locking_strategy_)
00931     {
00932       // We need to acquire the lock before incrementing the count.
00933       ACE_GUARD_RETURN (ACE_Lock, ace_mon, *this->locking_strategy_, 0);
00934       this->reference_count_++;
00935     }
00936   else
00937     this->reference_count_++;
00938 
00939   return this;
00940 }
00941 
00942 #if defined (ACE_HAS_TIMED_MESSAGE_BLOCKS)
00943 #define ACE_EXECUTION_TIME this->execution_time_
00944 #define ACE_DEADLINE_TIME this->deadline_time_
00945 #else
00946 #define ACE_EXECUTION_TIME ACE_Time_Value::zero
00947 #define ACE_DEADLINE_TIME ACE_Time_Value::max_time
00948 #endif /* ACE_HAS_TIMED_MESSAGE_BLOCKS */
00949 
00950 ACE_Message_Block *
00951 ACE_Message_Block::duplicate (void) const
00952 {
00953   ACE_TRACE ("ACE_Message_Block::duplicate");
00954 
00955   ACE_Message_Block *nb;
00956 
00957   // Create a new <ACE_Message_Block> that contains unique copies of
00958   // the message block fields, but a reference counted duplicate of
00959   // the <ACE_Data_Block>.
00960 
00961   // If there is no allocator, use the standard new and delete calls.
00962   if (this->message_block_allocator_ == 0)
00963     ACE_NEW_RETURN (nb,
00964                     ACE_Message_Block (0, // size
00965                                        ACE_Message_Type (0), // type
00966                                        0, // cont
00967                                        0, // data
00968                                        0, // allocator
00969                                        0, // locking strategy
00970                                        0, // flags
00971                                        this->priority_, // priority
00972                                        ACE_EXECUTION_TIME,
00973                                        ACE_DEADLINE_TIME,
00974                                        // Get a pointer to a
00975                                        // "duplicated" <ACE_Data_Block>
00976                                        // (will simply increment the
00977                                        // reference count).
00978                                        this->data_block ()->duplicate  (),
00979                                        this->data_block ()->data_block_allocator (),
00980                                        this->message_block_allocator_),
00981                   0);
00982   else // Otherwise, use the message_block_allocator passed in.
00983     ACE_NEW_MALLOC_RETURN (nb,
00984                            ACE_static_cast(ACE_Message_Block*,
00985                              message_block_allocator_->malloc (sizeof (ACE_Message_Block))),
00986                            ACE_Message_Block (0, // size
00987                                               ACE_Message_Type (0), // type
00988                                               0, // cont
00989                                               0, // data
00990                                               0, // allocator
00991                                               0, // locking strategy
00992                                               0, // flags
00993                                               this->priority_, // priority
00994                                               ACE_EXECUTION_TIME,
00995                                               ACE_DEADLINE_TIME,
00996                                               // Get a pointer to a
00997                                               // "duplicated" <ACE_Data_Block>
00998                                               // (will simply increment the
00999                                               // reference count).
01000                                               this->data_block ()->duplicate  (),
01001                                               this->data_block ()->data_block_allocator (),
01002                                               this->message_block_allocator_),
01003                            0);
01004 
01005   // Set the read and write pointers in the new <Message_Block> to the
01006   // same relative offset as in the existing <Message_Block>.  Note
01007   // that we are assuming that the data_block()->base() pointer
01008   // doesn't change when it's duplicated.
01009   nb->rd_ptr (this->rd_ptr_);
01010   nb->wr_ptr (this->wr_ptr_);
01011 
01012   // Increment the reference counts of all the continuation messages.
01013   if (this->cont_)
01014     {
01015       nb->cont_ = this->cont_->duplicate ();
01016 
01017       // If things go wrong, release all of our resources and return
01018       // 0.
01019       if (nb->cont_ == 0)
01020         {
01021           nb->release ();
01022           nb = 0;
01023         }
01024     }
01025 
01026   return nb;
01027 }
01028 
01029 ACE_Message_Block *
01030 ACE_Message_Block::duplicate (const ACE_Message_Block *mb)
01031 {
01032   ACE_TRACE ("ACE_Message_Block::duplicate");
01033   if (mb == 0)
01034     return 0;
01035   else
01036     return mb->duplicate ();
01037 }
01038 
01039 ACE_Data_Block *
01040 ACE_Data_Block::clone (ACE_Message_Block::Message_Flags mask) const
01041 {
01042   ACE_TRACE ("ACE_Data_Block::clone");
01043 
01044   ACE_Data_Block *nb = this->clone_nocopy (mask);
01045 
01046   // Copy all of the payload memory into the new object.
01047   if (nb != 0)
01048     {
01049       ACE_OS::memcpy (nb->base_,
01050                       this->base_,
01051                       this->max_size_);
01052     }
01053 
01054   return nb;
01055 }
01056 
01057 ACE_Data_Block *
01058 ACE_Data_Block::clone_nocopy (ACE_Message_Block::Message_Flags mask) const
01059 {
01060   ACE_FUNCTION_TIMEPROBE(ACE_DATA_BLOCK_CLONE_ENTER);
01061 
01062   ACE_TRACE ("ACE_Data_Block::clone_nocopy");
01063 
01064   // You always want to clear this one to prevent memory leaks but you
01065   // might add some others later.
01066   const ACE_Message_Block::Message_Flags always_clear =
01067     ACE_Message_Block::DONT_DELETE;
01068 
01069   ACE_Data_Block *nb;
01070 
01071   ACE_NEW_MALLOC_RETURN (nb,
01072                          ACE_static_cast(ACE_Data_Block*,
01073                            this->data_block_allocator_->malloc (sizeof (ACE_Data_Block))),
01074                          ACE_Data_Block (this->max_size_, // size
01075                                          this->type_,     // type
01076                                          0,               // data
01077                                          this->allocator_strategy_, // allocator
01078                                          this->locking_strategy_, // locking strategy
01079                                          this->flags_,  // flags
01080                                          this->data_block_allocator_),
01081                          0);
01082 
01083 
01084   // Set new flags minus the mask...
01085   nb->clr_flags (mask | always_clear);
01086   return nb;
01087 }
01088 
01089 ACE_Message_Block *
01090 ACE_Message_Block::clone (Message_Flags mask) const
01091 {
01092   ACE_TRACE ("ACE_Message_Block::clone");
01093 
01094   // Get a pointer to a "cloned" <ACE_Data_Block> (will copy the
01095   // values rather than increment the reference count).
01096   ACE_Data_Block *db = this->data_block ()->clone (mask);
01097 
01098   if (db == 0)
01099     return 0;
01100 
01101   ACE_Message_Block *nb;
01102 
01103   if(message_block_allocator_ == 0)
01104     {
01105       ACE_NEW_RETURN (nb,
01106                       ACE_Message_Block (0, // size
01107                                          ACE_Message_Type (0), // type
01108                                          0, // cont
01109                                          0, // data
01110                                          0, // allocator
01111                                          0, // locking strategy
01112                                          0, // flags
01113                                          this->priority_, // priority
01114                                          ACE_EXECUTION_TIME, // execution time
01115                                          ACE_DEADLINE_TIME, // absolute time to deadline
01116                                          // Get a pointer to a
01117                                          // "duplicated" <ACE_Data_Block>
01118                                          // (will simply increment the
01119                                          // reference count).
01120                                          db,
01121                                          db->data_block_allocator (),
01122                                          this->message_block_allocator_),
01123                       0);
01124     }
01125   else
01126     {
01127       // This is the ACE_NEW_MALLOC macro with the return check removed.
01128       // We need to do it this way because if it fails we need to release
01129       // the cloned data block that was created above.  If we used
01130       // ACE_NEW_MALLOC_RETURN, there would be a memory leak because the
01131       // above db pointer would be left dangling.
01132       nb = ACE_static_cast(ACE_Message_Block*,message_block_allocator_->malloc (sizeof (ACE_Message_Block)));
01133       if(nb != 0)
01134         new (nb) ACE_Message_Block (0, // size
01135                                     ACE_Message_Type (0), // type
01136                                     0, // cont
01137                                     0, // data
01138                                     0, // allocator
01139                                     0, // locking strategy
01140                                     0, // flags
01141                                     this->priority_, // priority
01142                                     ACE_EXECUTION_TIME, // execution time
01143                                     ACE_DEADLINE_TIME, // absolute time to deadline
01144                                     db,
01145                                     db->data_block_allocator (),
01146                                     this->message_block_allocator_);
01147     }
01148 
01149   if (nb == 0)
01150     {
01151       db->release ();
01152       return 0;
01153     }
01154 
01155   // Set the read and write pointers in the new <Message_Block> to the
01156   // same relative offset as in the existing <Message_Block>.
01157   nb->rd_ptr (this->rd_ptr_);
01158   nb->wr_ptr (this->wr_ptr_);
01159 
01160   // Clone all the continuation messages if necessary.
01161   if (this->cont () != 0
01162       && (nb->cont_ = this->cont ()->clone (mask)) == 0)
01163     {
01164       nb->release ();
01165       return 0;
01166     }
01167   return nb;
01168 }
01169 
01170 // This is private.
01171 ACE_Message_Block &
01172 ACE_Message_Block::operator= (const ACE_Message_Block &)
01173 {
01174   ACE_TRACE ("ACE_Message_Block::operator=");
01175   return *this;
01176 }
01177 
01178 void
01179 ACE_Data_Block::base (char *msg_data,
01180                       size_t msg_length,
01181                       ACE_Message_Block::Message_Flags msg_flags)
01182 {
01183   if (ACE_BIT_DISABLED (this->flags_,
01184                         ACE_Message_Block::DONT_DELETE))
01185     this->allocator_strategy_->free (this->base_);
01186   this->max_size_ = msg_length;
01187   this->cur_size_ = msg_length;
01188   this->base_ = msg_data;
01189   this->flags_ = msg_flags;
01190 }
01191 
01192 // ctor
01193 
01194 ACE_Dynamic_Message_Strategy::ACE_Dynamic_Message_Strategy (u_long static_bit_field_mask,
01195                                                             u_long static_bit_field_shift,
01196                                                             u_long dynamic_priority_max,
01197                                                             u_long dynamic_priority_offset)
01198   : static_bit_field_mask_ (static_bit_field_mask),
01199     static_bit_field_shift_ (static_bit_field_shift),
01200     dynamic_priority_max_ (dynamic_priority_max),
01201     dynamic_priority_offset_ (dynamic_priority_offset),
01202     max_late_ (0, dynamic_priority_offset - 1),
01203     min_pending_ (0, dynamic_priority_offset),
01204     pending_shift_ (0, dynamic_priority_max)
01205 {
01206 }
01207 
01208 // dtor
01209 
01210 ACE_Dynamic_Message_Strategy::~ACE_Dynamic_Message_Strategy (void)
01211 {
01212 }
01213 
01214 // Dump the state of the strategy.
01215 
01216 void
01217 ACE_Dynamic_Message_Strategy::dump (void) const
01218 {
01219   ACE_TRACE ("ACE_Dynamic_Message_Strategy::dump");
01220 
01221   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
01222 
01223   ACE_DEBUG ((LM_DEBUG,
01224               ACE_LIB_TEXT ("static_bit_field_mask_ = %u\n")
01225               ACE_LIB_TEXT ("static_bit_field_shift_ = %u\n")
01226               ACE_LIB_TEXT ("dynamic_priority_max_ = %u\n")
01227               ACE_LIB_TEXT ("dynamic_priority_offset_ = %u\n")
01228               ACE_LIB_TEXT ("max_late_ = [%d sec, %d usec]\n")
01229               ACE_LIB_TEXT ("min_pending_ = [%d sec, %d usec]\n")
01230               ACE_LIB_TEXT ("pending_shift_ = [%d sec, %d usec]\n"),
01231               this->static_bit_field_mask_,
01232               this->static_bit_field_shift_,
01233               this->dynamic_priority_max_,
01234               this->dynamic_priority_offset_,
01235               this->max_late_.sec (),
01236               this->max_late_.usec (),
01237               this->min_pending_.sec (),
01238               this->min_pending_.usec (),
01239               this->pending_shift_.sec (),
01240               this->pending_shift_.usec ()));
01241 
01242   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
01243 }
01244 
01245 ACE_Deadline_Message_Strategy:: ACE_Deadline_Message_Strategy (u_long static_bit_field_mask,
01246                                                                u_long static_bit_field_shift,
01247                                                                u_long dynamic_priority_max,
01248                                                                u_long dynamic_priority_offset)
01249   : ACE_Dynamic_Message_Strategy (static_bit_field_mask,
01250                                   static_bit_field_shift,
01251                                   dynamic_priority_max,
01252                                   dynamic_priority_offset)
01253 {
01254 }
01255 
01256 ACE_Deadline_Message_Strategy::~ACE_Deadline_Message_Strategy (void)
01257 {
01258 }
01259 
01260 void
01261 ACE_Deadline_Message_Strategy::dump (void) const
01262 {
01263   ACE_TRACE ("ACE_Deadline_Message_Strategy::dump");
01264 
01265   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
01266 
01267   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("ACE_Dynamic_Message_Strategy base class: \n")));
01268   this->ACE_Dynamic_Message_Strategy::dump ();
01269 
01270   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nderived class: ACE_Deadline_Message_Strategy\n")));
01271 
01272   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
01273 }
01274 
01275 ACE_Laxity_Message_Strategy::ACE_Laxity_Message_Strategy (u_long static_bit_field_mask,
01276                                                           u_long static_bit_field_shift,
01277                                                           u_long dynamic_priority_max,
01278                                                           u_long dynamic_priority_offset)
01279   : ACE_Dynamic_Message_Strategy (static_bit_field_mask,
01280                                   static_bit_field_shift,
01281                                   dynamic_priority_max,
01282                                   dynamic_priority_offset)
01283 {
01284 }
01285 
01286 ACE_Laxity_Message_Strategy::~ACE_Laxity_Message_Strategy (void)
01287 {
01288 }
01289 
01290 void
01291 ACE_Laxity_Message_Strategy::dump (void) const
01292 {
01293   ACE_TRACE ("ACE_Laxity_Message_Strategy::dump");
01294 
01295   ACE_DEBUG ((LM_DEBUG, ACE_BEGIN_DUMP, this));
01296 
01297   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("ACE_Dynamic_Message_Strategy base class: \n")));
01298   this->ACE_Dynamic_Message_Strategy::dump ();
01299 
01300   ACE_DEBUG ((LM_DEBUG, ACE_LIB_TEXT ("\nderived class: ACE_Laxity_Message_Strategy\n")));
01301 
01302   ACE_DEBUG ((LM_DEBUG, ACE_END_DUMP));
01303 }
01304   // Dump the state of the strategy.
01305 
01306 #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION)
01307 template class ACE_Guard <ACE_Lock>;
01308 // These specializations aren't needed for the ACE library because
01309 // Service_Config.cpp has them:
01310 //
01311 // template class ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex>;
01312 // template class ACE_Allocator_Adapter <ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> >;
01313 #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA)
01314 #pragma instantiate ACE_Guard <ACE_Lock>
01315 // These specializations aren't needed for the ACE library because
01316 // Service_Config.cpp has them:
01317 //
01318 // #pragma instantiate ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex>
01319 // #pragma instantiate ACE_Allocator_Adapter <ACE_Malloc <ACE_LOCAL_MEMORY_POOL, ACE_Null_Mutex> >
01320 #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */

Generated on Mon Jun 16 11:20:21 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002