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

Synch.i

Go to the documentation of this file.
00001 /* -*- C++ -*- */
00002 // $Id: Synch.i,v 1.1.1.4 2003/02/21 18:36:32 chad Exp $
00003 
00004 ACE_INLINE
00005 ACE_Lock::ACE_Lock (void)
00006 {
00007 }
00008 
00009 ACE_INLINE const ACE_rwlock_t &
00010 ACE_RW_Mutex::lock (void) const
00011 {
00012 // ACE_TRACE ("ACE_RW_Mutex::lock");
00013   return this->lock_;
00014 }
00015 
00016 ACE_INLINE int
00017 ACE_RW_Mutex::remove (void)
00018 {
00019 // ACE_TRACE ("ACE_RW_Mutex::remove");
00020   int result = 0;
00021   if (this->removed_ == 0)
00022     {
00023       this->removed_ = 1;
00024       result = ACE_OS::rwlock_destroy (&this->lock_);
00025     }
00026   return result;
00027 }
00028 
00029 ACE_INLINE int
00030 ACE_RW_Mutex::acquire_read (void)
00031 {
00032 // ACE_TRACE ("ACE_RW_Mutex::acquire_read");
00033   return ACE_OS::rw_rdlock (&this->lock_);
00034 }
00035 
00036 ACE_INLINE int
00037 ACE_RW_Mutex::acquire_write (void)
00038 {
00039 // ACE_TRACE ("ACE_RW_Mutex::acquire_write");
00040   return ACE_OS::rw_wrlock (&this->lock_);
00041 }
00042 
00043 ACE_INLINE int
00044 ACE_RW_Mutex::acquire (void)
00045 {
00046 // ACE_TRACE ("ACE_RW_Mutex::acquire");
00047   return ACE_OS::rw_wrlock (&this->lock_);
00048 }
00049 
00050 ACE_INLINE int
00051 ACE_RW_Mutex::tryacquire_read (void)
00052 {
00053 // ACE_TRACE ("ACE_RW_Mutex::tryacquire_read");
00054   return ACE_OS::rw_tryrdlock (&this->lock_);
00055 }
00056 
00057 ACE_INLINE int
00058 ACE_RW_Mutex::tryacquire_write (void)
00059 {
00060 // ACE_TRACE ("ACE_RW_Mutex::tryacquire_write");
00061   return ACE_OS::rw_trywrlock (&this->lock_);
00062 }
00063 
00064 ACE_INLINE int
00065 ACE_RW_Mutex::tryacquire_write_upgrade (void)
00066 {
00067 // ACE_TRACE ("ACE_RW_Mutex::tryacquire_write_upgrade");
00068   return ACE_OS::rw_trywrlock_upgrade (&this->lock_);
00069 }
00070 
00071 ACE_INLINE int
00072 ACE_RW_Mutex::tryacquire (void)
00073 {
00074 // ACE_TRACE ("ACE_RW_Mutex::tryacquire");
00075   return this->tryacquire_write ();
00076 }
00077 
00078 ACE_INLINE int
00079 ACE_RW_Mutex::release (void)
00080 {
00081 // ACE_TRACE ("ACE_RW_Mutex::release");
00082   return ACE_OS::rw_unlock (&this->lock_);
00083 }
00084 
00085 #if defined (ACE_HAS_THREADS)
00086 ACE_INLINE int
00087 ACE_RW_Thread_Mutex::tryacquire_write_upgrade (void)
00088 {
00089 // ACE_TRACE ("ACE_RW_Thread_Mutex::tryacquire_write_upgrade");
00090   return ACE_OS::rw_trywrlock_upgrade (&this->lock_);
00091 }
00092 #endif /* ACE_HAS_THREADS */
00093 
00094 ACE_INLINE int
00095 ACE_Mutex::acquire_read (void)
00096 {
00097 // ACE_TRACE ("ACE_Mutex::acquire_read");
00098 #if defined (CHORUS)
00099    if (this->process_lock_)
00100      return ACE_OS::mutex_lock (this->process_lock_);
00101 #endif /* CHORUS */
00102   return ACE_OS::mutex_lock (&this->lock_);
00103 }
00104 
00105 ACE_INLINE int
00106 ACE_Mutex::acquire_write (void)
00107 {
00108 // ACE_TRACE ("ACE_Mutex::acquire_write");
00109 #if defined (CHORUS)
00110    if (this->process_lock_)
00111      return ACE_OS::mutex_lock (this->process_lock_);
00112 #endif /* CHORUS */
00113   return ACE_OS::mutex_lock (&this->lock_);
00114 }
00115 
00116 ACE_INLINE int
00117 ACE_Mutex::tryacquire_read (void)
00118 {
00119 // ACE_TRACE ("ACE_Mutex::tryacquire_read");
00120 #if defined (CHORUS)
00121    if (this->process_lock_)
00122      return ACE_OS::mutex_trylock (this->process_lock_);
00123 #endif /* CHORUS */
00124   return ACE_OS::mutex_trylock (&this->lock_);
00125 }
00126 
00127 ACE_INLINE const ACE_mutex_t &
00128 ACE_Mutex::lock (void) const
00129 {
00130 // ACE_TRACE ("ACE_Mutex::lock");
00131 #if defined (CHORUS)
00132   if (this->process_lock_)
00133     return *this->process_lock_;
00134 #endif /* CHORUS */
00135   return this->lock_;
00136 }
00137 
00138 ACE_INLINE int
00139 ACE_Mutex::tryacquire_write (void)
00140 {
00141 // ACE_TRACE ("ACE_Mutex::tryacquire_write");
00142 #if defined (CHORUS)
00143    if (this->process_lock_)
00144      return ACE_OS::mutex_trylock (this->process_lock_);
00145 #endif /* CHORUS */
00146   return ACE_OS::mutex_trylock (&this->lock_);
00147 }
00148 
00149 ACE_INLINE int
00150 ACE_Mutex::tryacquire_write_upgrade (void)
00151 {
00152 // ACE_TRACE ("ACE_Mutex::tryacquire_write_upgrade");
00153   return 0;
00154 }
00155 
00156 ACE_INLINE int
00157 ACE_Mutex::acquire (void)
00158 {
00159 // ACE_TRACE ("ACE_Mutex::acquire");
00160 #if defined (CHORUS)
00161    if (this->process_lock_)
00162      return ACE_OS::mutex_lock (this->process_lock_);
00163 #endif /* CHORUS */
00164   return ACE_OS::mutex_lock (&this->lock_);
00165 }
00166 
00167 ACE_INLINE int
00168 ACE_Mutex::acquire (ACE_Time_Value &tv)
00169 {
00170   // ACE_TRACE ("ACE_Mutex::acquire");
00171   return ACE_OS::mutex_lock (&this->lock_, tv);
00172 }
00173 
00174 ACE_INLINE int
00175 ACE_Mutex::acquire (ACE_Time_Value *tv)
00176 {
00177   // ACE_TRACE ("ACE_Mutex::acquire");
00178   return ACE_OS::mutex_lock (&this->lock_, tv);
00179 }
00180 
00181 ACE_INLINE int
00182 ACE_Mutex::tryacquire (void)
00183 {
00184 // ACE_TRACE ("ACE_Mutex::tryacquire");
00185 #if defined (CHORUS)
00186    if (this->process_lock_)
00187      return ACE_OS::mutex_trylock (this->process_lock_);
00188 #endif /* CHORUS */
00189   return ACE_OS::mutex_trylock (&this->lock_);
00190 }
00191 
00192 ACE_INLINE int
00193 ACE_Mutex::release (void)
00194 {
00195 // ACE_TRACE ("ACE_Mutex::release");
00196 #if defined (CHORUS)
00197    if (this->process_lock_)
00198      return ACE_OS::mutex_unlock (this->process_lock_);
00199 #endif /* CHORUS */
00200   return ACE_OS::mutex_unlock (&this->lock_);
00201 }
00202 
00203 ACE_INLINE int
00204 ACE_Mutex::remove (void)
00205 {
00206 // ACE_TRACE ("ACE_Mutex::remove");
00207 #if defined (CHORUS) || defined (ACE_HAS_PTHREADS) || defined (ACE_HAS_STHREADS)
00208    int result = 0;
00209    // In the case of a interprocess mutex, the owner is the first
00210    // process that created the shared memory object. In this case, the
00211    // lockname_ pointer will be non-zero (points to allocated memory
00212    // for the name).  Owner or not, the memory needs to be unmapped
00213    // from the process.  If we are the owner, the file used for
00214    // shm_open needs to be deleted as well.
00215    if (this->process_lock_)
00216      {
00217        if (this->removed_ == 0)
00218          {
00219            this->removed_ = 1;
00220 
00221            // Only destroy the lock if we're the ones who initialized
00222            // it.
00223            if (!this->lockname_)
00224              ACE_OS::munmap ((void *) this->process_lock_,
00225                              sizeof (ACE_mutex_t));
00226            else
00227              {
00228                result = ACE_OS::mutex_destroy (this->process_lock_);
00229                ACE_OS::munmap ((void *) this->process_lock_,
00230                                sizeof (ACE_mutex_t));
00231                ACE_OS::shm_unlink (this->lockname_);
00232                ACE_OS::free (ACE_static_cast (void *,
00233                                               ACE_const_cast (ACE_TCHAR *,
00234                                                             this->lockname_)));
00235              }
00236          }
00237      }
00238    return result;
00239 #else /* !CHORUS */
00240   int result = 0;
00241   if (this->removed_ == 0)
00242     {
00243       this->removed_ = 1;
00244       result = ACE_OS::mutex_destroy (&this->lock_);
00245     }
00246   return result;
00247 #endif /* CHORUS */
00248 }
00249 
00250 ACE_INLINE const ACE_sema_t &
00251 ACE_Semaphore::lock (void) const
00252 {
00253 // ACE_TRACE ("ACE_Semaphore::lock");
00254   return this->semaphore_;
00255 }
00256 
00257 ACE_INLINE int
00258 ACE_Semaphore::remove (void)
00259 {
00260 // ACE_TRACE ("ACE_Semaphore::remove");
00261   int result = 0;
00262   if (this->removed_ == 0)
00263     {
00264       this->removed_ = 1;
00265       result = ACE_OS::sema_destroy (&this->semaphore_);
00266     }
00267   return result;
00268 }
00269 
00270 ACE_INLINE int
00271 ACE_Semaphore::acquire (void)
00272 {
00273 // ACE_TRACE ("ACE_Semaphore::acquire");
00274   return ACE_OS::sema_wait (&this->semaphore_);
00275 }
00276 
00277 ACE_INLINE int
00278 ACE_Semaphore::acquire (ACE_Time_Value &tv)
00279 {
00280 // ACE_TRACE ("ACE_Semaphore::acquire");
00281   return ACE_OS::sema_wait (&this->semaphore_, tv);
00282 }
00283 
00284 ACE_INLINE int
00285 ACE_Semaphore::acquire (ACE_Time_Value *tv)
00286 {
00287 // ACE_TRACE ("ACE_Semaphore::acquire");
00288   return ACE_OS::sema_wait (&this->semaphore_, tv);
00289 }
00290 
00291 ACE_INLINE int
00292 ACE_Semaphore::tryacquire (void)
00293 {
00294 // ACE_TRACE ("ACE_Semaphore::tryacquire");
00295   return ACE_OS::sema_trywait (&this->semaphore_);
00296 }
00297 
00298 ACE_INLINE int
00299 ACE_Semaphore::release (void)
00300 {
00301 // ACE_TRACE ("ACE_Semaphore::release");
00302   return ACE_OS::sema_post (&this->semaphore_);
00303 }
00304 
00305 ACE_INLINE int
00306 ACE_Semaphore::release (u_int release_count)
00307 {
00308 // ACE_TRACE ("ACE_Semaphore::release");
00309   return ACE_OS::sema_post (&this->semaphore_, release_count);
00310 }
00311 
00312 // Acquire semaphore ownership.  This calls <acquire> and is only
00313 // here to make the <ACE_Semaphore> interface consistent with the
00314 // other synchronization APIs.
00315 
00316 ACE_INLINE int
00317 ACE_Semaphore::acquire_read (void)
00318 {
00319   return this->acquire ();
00320 }
00321 
00322 // Acquire semaphore ownership.  This calls <acquire> and is only
00323 // here to make the <ACE_Semaphore> interface consistent with the
00324 // other synchronization APIs.
00325 
00326 ACE_INLINE int
00327 ACE_Semaphore::acquire_write (void)
00328 {
00329   return this->acquire ();
00330 }
00331 
00332 // Conditionally acquire semaphore (i.e., won't block).  This calls
00333 // <tryacquire> and is only here to make the <ACE_Semaphore>
00334 // interface consistent with the other synchronization APIs.
00335 
00336 ACE_INLINE int
00337 ACE_Semaphore::tryacquire_read (void)
00338 {
00339   return this->tryacquire ();
00340 }
00341 
00342 // Conditionally acquire semaphore (i.e., won't block).  This calls
00343 // <tryacquire> and is only here to make the <ACE_Semaphore>
00344 // interface consistent with the other synchronization APIs.
00345 
00346 ACE_INLINE int
00347 ACE_Semaphore::tryacquire_write (void)
00348 {
00349   return this->tryacquire ();
00350 }
00351 
00352 // This is only here to make the <ACE_Semaphore> interface consistent
00353 // with the other synchronization APIs.  Assumes the caller has
00354 // already acquired the semaphore using one of the above calls, and
00355 // returns 0 (success) always.
00356 ACE_INLINE int
00357 ACE_Semaphore::tryacquire_write_upgrade (void)
00358 {
00359   return 0;
00360 }
00361 
00362 // Null ACE_Semaphore implementation
00363 
00364 ACE_INLINE
00365 ACE_Null_Semaphore::ACE_Null_Semaphore (u_int,
00366                                         int,
00367                                         const ACE_TCHAR *,
00368                                         void *,
00369                                         int)
00370 {
00371 }
00372 
00373 ACE_INLINE
00374 ACE_Null_Semaphore::~ACE_Null_Semaphore (void)
00375 {
00376 }
00377 
00378 ACE_INLINE int
00379 ACE_Null_Semaphore::remove (void)
00380 {
00381   return 0;
00382 }
00383 
00384 ACE_INLINE int
00385 ACE_Null_Semaphore::acquire (ACE_Time_Value &)
00386 {
00387   errno = ETIME;
00388   return -1;
00389 }
00390 
00391 ACE_INLINE int
00392 ACE_Null_Semaphore::acquire (ACE_Time_Value *)
00393 {
00394   errno = ETIME;
00395   return -1;
00396 }
00397 
00398 ACE_INLINE int
00399 ACE_Null_Semaphore::acquire (void)
00400 {
00401   return 0;
00402 }
00403 
00404 ACE_INLINE int
00405 ACE_Null_Semaphore::tryacquire (void)
00406 {
00407   return 0;
00408 }
00409 
00410 ACE_INLINE int
00411 ACE_Null_Semaphore::release (size_t)
00412 {
00413   return 0;
00414 }
00415 
00416 ACE_INLINE int
00417 ACE_Null_Semaphore::release (void)
00418 {
00419   return 0;
00420 }
00421 
00422 ACE_INLINE int
00423 ACE_Null_Semaphore::acquire_write (void)
00424 {
00425   return 0;
00426 }
00427 
00428 ACE_INLINE int
00429 ACE_Null_Semaphore::tryacquire_write (void)
00430 {
00431   return 0;
00432 }
00433 
00434 ACE_INLINE int
00435 ACE_Null_Semaphore::tryacquire_write_upgrade (void)
00436 {
00437   return 0;
00438 }
00439 
00440 ACE_INLINE int
00441 ACE_Null_Semaphore::acquire_read (void)
00442 {
00443   return 0;
00444 }
00445 
00446 ACE_INLINE int
00447 ACE_Null_Semaphore::tryacquire_read (void)
00448 {
00449   return 0;
00450 }
00451 
00452 ACE_INLINE void
00453 ACE_Null_Semaphore::dump (void) const
00454 {
00455 }
00456 
00457 #if defined (ACE_HAS_THREADS)
00458 
00459 ACE_INLINE const ACE_thread_mutex_t &
00460 ACE_Thread_Mutex::lock (void) const
00461 {
00462 // ACE_TRACE ("ACE_Thread_Mutex::lock");
00463   return this->lock_;
00464 }
00465 
00466 ACE_INLINE int
00467 ACE_Thread_Mutex::acquire_read (void)
00468 {
00469 // ACE_TRACE ("ACE_Thread_Mutex::acquire_read");
00470   return ACE_OS::thread_mutex_lock (&this->lock_);
00471 }
00472 
00473 ACE_INLINE int
00474 ACE_Thread_Mutex::acquire_write (void)
00475 {
00476 // ACE_TRACE ("ACE_Thread_Mutex::acquire_write");
00477   return ACE_OS::thread_mutex_lock (&this->lock_);
00478 }
00479 
00480 ACE_INLINE int
00481 ACE_Thread_Mutex::tryacquire_read (void)
00482 {
00483 // ACE_TRACE ("ACE_Thread_Mutex::tryacquire_read");
00484   return ACE_OS::thread_mutex_trylock (&this->lock_);
00485 }
00486 
00487 ACE_INLINE int
00488 ACE_Thread_Mutex::tryacquire_write (void)
00489 {
00490 // ACE_TRACE ("ACE_Thread_Mutex::tryacquire_write");
00491   return ACE_OS::thread_mutex_trylock (&this->lock_);
00492 }
00493 
00494 ACE_INLINE int
00495 ACE_Thread_Mutex::tryacquire_write_upgrade (void)
00496 {
00497 // ACE_TRACE ("ACE_Thread_Mutex::tryacquire_write_upgrade");
00498   return 0;
00499 }
00500 
00501 ACE_INLINE int
00502 ACE_Thread_Mutex::acquire (void)
00503 {
00504 // ACE_TRACE ("ACE_Thread_Mutex::acquire");
00505   return ACE_OS::thread_mutex_lock (&this->lock_);
00506 }
00507 
00508 ACE_INLINE int
00509 ACE_Thread_Mutex::acquire (ACE_Time_Value &tv)
00510 {
00511   // ACE_TRACE ("ACE_Thread_Mutex::acquire");
00512   return ACE_OS::thread_mutex_lock (&this->lock_, tv);
00513 }
00514 
00515 ACE_INLINE int
00516 ACE_Thread_Mutex::acquire (ACE_Time_Value *tv)
00517 {
00518   // ACE_TRACE ("ACE_Thread_Mutex::acquire");
00519   return ACE_OS::thread_mutex_lock (&this->lock_, tv);
00520 }
00521 
00522 ACE_INLINE int
00523 ACE_Thread_Mutex::tryacquire (void)
00524 {
00525 // ACE_TRACE ("ACE_Thread_Mutex::tryacquire");
00526   return ACE_OS::thread_mutex_trylock (&this->lock_);
00527 }
00528 
00529 ACE_INLINE int
00530 ACE_Thread_Mutex::release (void)
00531 {
00532 // ACE_TRACE ("ACE_Thread_Mutex::release");
00533   return ACE_OS::thread_mutex_unlock (&this->lock_);
00534 }
00535 
00536 ACE_INLINE int
00537 ACE_Thread_Mutex::remove (void)
00538 {
00539 // ACE_TRACE ("ACE_Thread_Mutex::remove");
00540   int result = 0;
00541   if (this->removed_ == 0)
00542     {
00543       this->removed_ = 1;
00544       result = ACE_OS::thread_mutex_destroy (&this->lock_);
00545     }
00546   return result;
00547 }
00548 
00549 #if defined (ACE_USES_OBSOLETE_GUARD_CLASSES)
00550 ACE_INLINE int
00551 ACE_Thread_Mutex_Guard::locked (void)
00552 {
00553 // ACE_TRACE ("ACE_Thread_Mutex_Guard::locked");
00554   return this->owner_ != -1;
00555 }
00556 
00557 // Explicitly acquire the lock.
00558 
00559 ACE_INLINE int
00560 ACE_Thread_Mutex_Guard::acquire (void)
00561 {
00562 // ACE_TRACE ("ACE_Thread_Mutex_Guard::acquire");
00563   return this->owner_ = this->lock_.acquire ();
00564 }
00565 
00566 // Conditionally acquire the lock (i.e., won't block).
00567 
00568 ACE_INLINE int
00569 ACE_Thread_Mutex_Guard::tryacquire (void)
00570 {
00571 // ACE_TRACE ("ACE_Thread_Mutex_Guard::tryacquire");
00572   return this->owner_ = this->lock_.tryacquire ();
00573 }
00574 
00575 // Implicitly and automatically acquire the lock.
00576 
00577 ACE_INLINE
00578 ACE_Thread_Mutex_Guard::ACE_Thread_Mutex_Guard (ACE_Thread_Mutex &m,
00579                                                 int block)
00580   : lock_ (m)
00581 {
00582 // ACE_TRACE ("ACE_Thread_Mutex_Guard::ACE_Thread_Mutex_Guard");
00583   if (block)
00584     this->acquire ();
00585   else
00586     this->tryacquire ();
00587 }
00588 
00589 // Explicitly release the lock.
00590 
00591 ACE_INLINE int
00592 ACE_Thread_Mutex_Guard::release (void)
00593 {
00594 // ACE_TRACE ("ACE_Thread_Mutex_Guard::release");
00595   if (this->owner_ != -1)
00596     {
00597       this->owner_ = -1;
00598       return this->lock_.release ();
00599     }
00600   else
00601     return 0;
00602 }
00603 
00604 // Implicitly release the lock.
00605 
00606 ACE_INLINE
00607 ACE_Thread_Mutex_Guard::~ACE_Thread_Mutex_Guard (void)
00608 {
00609 // ACE_TRACE ("ACE_Thread_Mutex_Guard::~ACE_Thread_Mutex_Guard");
00610   this->release ();
00611 }
00612 
00613 // Explicitly release the lock.
00614 
00615 ACE_INLINE int
00616 ACE_Thread_Mutex_Guard::remove (void)
00617 {
00618 // ACE_TRACE ("ACE_Thread_Mutex_Guard::remove");
00619   this->owner_ = -1;
00620   return this->release ();
00621 }
00622 #endif /* ACE_USES_OBSOLETE_GUARD_CLASSES */
00623 
00624 ACE_INLINE
00625 ACE_Condition_Attributes::ACE_Condition_Attributes (int type)
00626 {
00627   (void) ACE_OS::condattr_init (this->attributes_, type);
00628 }
00629 
00630 ACE_INLINE
00631 ACE_Condition_Attributes::~ACE_Condition_Attributes (void)
00632 {
00633   ACE_OS::condattr_destroy (this->attributes_);
00634 }
00635 
00636 ACE_INLINE int
00637 ACE_Condition_Thread_Mutex::remove (void)
00638 {
00639 // ACE_TRACE ("ACE_Condition_Thread_Mutex::remove");
00640 
00641   // <cond_destroy> is called in a loop if the condition variable is
00642   // BUSY.  This avoids a condition where a condition is signaled and
00643   // because of some timing problem, the thread that is to be signaled
00644   // has called the cond_wait routine after the signal call.  Since
00645   // the condition signal is not queued in any way, deadlock occurs.
00646 
00647   int result = 0;
00648 
00649   if (this->removed_ == 0)
00650     {
00651       this->removed_ = 1;
00652 
00653       while ((result = ACE_OS::cond_destroy (&this->cond_)) == -1
00654              && errno == EBUSY)
00655         {
00656           ACE_OS::cond_broadcast (&this->cond_);
00657           ACE_OS::thr_yield ();
00658         }
00659     }
00660   return result;
00661 }
00662 
00663 ACE_INLINE ACE_Thread_Mutex &
00664 ACE_Condition_Thread_Mutex::mutex (void)
00665 {
00666 // ACE_TRACE ("ACE_Condition_Thread_Mutex::mutex");
00667   return this->mutex_;
00668 }
00669 
00670 ACE_INLINE ACE_recursive_thread_mutex_t &
00671 ACE_Recursive_Thread_Mutex::mutex (void)
00672 {
00673   return recursive_mutex_;
00674 }
00675 
00676 ACE_INLINE ACE_thread_mutex_t &
00677 ACE_Recursive_Thread_Mutex::get_nesting_mutex (void)
00678 {
00679 #if defined (ACE_HAS_RECURSIVE_MUTEXES)
00680   return ACE_static_cast (ACE_thread_mutex_t &,
00681                           recursive_mutex_);
00682 #else
00683   return recursive_mutex_.nesting_mutex_;
00684 #endif /* ACE_HAS_RECURSIVE_MUTEXES */
00685 }
00686 
00687 ACE_INLINE void
00688 ACE_Recursive_Thread_Mutex::set_thread_id (ACE_thread_t t)
00689 {
00690 // ACE_TRACE ("ACE_Recursive_Thread_Mutex::set_thread_id");
00691 #if defined (ACE_HAS_RECURSIVE_MUTEXES)
00692   ACE_UNUSED_ARG (t);
00693 #else  /* ! ACE_HAS_RECURSIVE_MUTEXES */
00694   this->recursive_mutex_.owner_id_ = t;
00695 #endif /* ! ACE_HAS_RECURSIVE_MUTEXES */
00696 }
00697 
00698 ACE_INLINE int
00699 ACE_Recursive_Thread_Mutex::acquire_read (void)
00700 {
00701   return this->acquire ();
00702 }
00703 
00704 ACE_INLINE int
00705 ACE_Recursive_Thread_Mutex::acquire_write (void)
00706 {
00707   return this->acquire ();
00708 }
00709 
00710 ACE_INLINE int
00711 ACE_Recursive_Thread_Mutex::tryacquire_read (void)
00712 {
00713   return this->tryacquire ();
00714 }
00715 
00716 ACE_INLINE int
00717 ACE_Recursive_Thread_Mutex::tryacquire_write (void)
00718 {
00719   return this->tryacquire ();
00720 }
00721 
00722 ACE_INLINE int
00723 ACE_Recursive_Thread_Mutex::tryacquire_write_upgrade (void)
00724 {
00725   return 0;
00726 }
00727 
00728 #endif /* ACE_HAS_THREADS */
00729 
00730 ACE_INLINE
00731 ACE_Null_Barrier::ACE_Null_Barrier (u_int,
00732                                     const char *,
00733                                     void *)
00734 {
00735 }
00736 
00737 ACE_INLINE
00738 ACE_Null_Barrier::~ACE_Null_Barrier (void)
00739 {
00740 }
00741 
00742 ACE_INLINE int
00743 ACE_Null_Barrier::wait (void)
00744 {
00745   return 0;
00746 }
00747 
00748 ACE_INLINE void
00749 ACE_Null_Barrier::dump (void) const
00750 {
00751 }
00752 
00753 ACE_INLINE
00754 ACE_Null_Mutex::ACE_Null_Mutex (const ACE_TCHAR *)
00755   : lock_ (0)
00756 {
00757 }
00758 
00759 ACE_INLINE
00760 ACE_Null_Mutex::~ACE_Null_Mutex (void)
00761 {
00762 }
00763 
00764 ACE_INLINE int
00765 ACE_Null_Mutex::remove (void)
00766 {
00767   return 0;
00768 }
00769 
00770 ACE_INLINE int
00771 ACE_Null_Mutex::acquire (void)
00772 {
00773   return 0;
00774 }
00775 
00776 ACE_INLINE int
00777 ACE_Null_Mutex::acquire (ACE_Time_Value &)
00778 {
00779   errno = ETIME;
00780   return -1;
00781 }
00782 
00783 ACE_INLINE int
00784 ACE_Null_Mutex::acquire (ACE_Time_Value *)
00785 {
00786   errno = ETIME;
00787   return -1;
00788 }
00789 
00790 ACE_INLINE int
00791 ACE_Null_Mutex::tryacquire (void)
00792 {
00793   return 0;
00794 }
00795 
00796 ACE_INLINE int
00797 ACE_Null_Mutex::release (void)
00798 {
00799   return 0;
00800 }
00801 
00802 ACE_INLINE int
00803 ACE_Null_Mutex::acquire_write (void)
00804 {
00805   return 0;
00806 }
00807 
00808 ACE_INLINE int
00809 ACE_Null_Mutex::tryacquire_write (void)
00810 {
00811   return 0;
00812 }
00813 
00814 ACE_INLINE int
00815 ACE_Null_Mutex::tryacquire_write_upgrade (void)
00816 {
00817   return 0;
00818 }
00819 
00820 ACE_INLINE int
00821 ACE_Null_Mutex::acquire_read (void)
00822 {
00823   return 0;
00824 }
00825 
00826 ACE_INLINE int
00827 ACE_Null_Mutex::tryacquire_read (void)
00828 {
00829   return 0;
00830 }
00831 
00832 ACE_INLINE void
00833 ACE_Null_Mutex::dump (void) const
00834 {
00835 }
00836 
00837 ACE_INLINE int
00838 ACE_Noop_Token::queueing_strategy (void)
00839 {
00840   return -1;
00841 }
00842 
00843 ACE_INLINE void
00844 ACE_Noop_Token::queueing_strategy (int /* queueing_strategy */)
00845 {
00846 }
00847 
00848 ACE_INLINE int
00849 ACE_Noop_Token::renew (int, ACE_Time_Value *)
00850 {
00851   return 0;
00852 }
00853 
00854 ACE_INLINE void
00855 ACE_Noop_Token::dump (void) const
00856 {
00857 }
00858 
00859 
00860 ACE_INLINE
00861 ACE_Null_Condition::ACE_Null_Condition (const ACE_Null_Mutex &m,
00862                                         const ACE_TCHAR *,
00863                                         void*)
00864   : mutex_ ((ACE_Null_Mutex &) m)
00865 {
00866 }
00867 
00868 ACE_INLINE ACE_Null_Condition::~ACE_Null_Condition (void)
00869 {
00870 }
00871 
00872 ACE_INLINE int ACE_Null_Condition::remove (void)
00873 {
00874   return 0;
00875 }
00876 
00877 ACE_INLINE int
00878 ACE_Null_Condition::wait (const ACE_Time_Value *)
00879 {
00880   errno = ETIME;
00881   return -1;
00882 }
00883 
00884 ACE_INLINE int
00885 ACE_Null_Condition::signal (void)
00886 {
00887   return 0;
00888 }
00889 
00890 ACE_INLINE int
00891 ACE_Null_Condition::broadcast (void)
00892 {
00893   return 0;
00894 }
00895 
00896 ACE_INLINE ACE_Null_Mutex &
00897 ACE_Null_Condition::mutex (void)
00898 {
00899   return this->mutex_;
00900 }
00901 
00902 ACE_INLINE void
00903 ACE_Null_Condition::dump (void) const
00904 {
00905 }
00906 
00907 #if defined (ACE_USES_OBSOLETE_GUARD_CLASSES)
00908 ACE_INLINE
00909 ACE_Null_Mutex_Guard::ACE_Null_Mutex_Guard (ACE_Null_Mutex &)
00910 {
00911 }
00912 
00913 ACE_INLINE
00914 ACE_Null_Mutex_Guard::~ACE_Null_Mutex_Guard (void)
00915 {
00916 }
00917 
00918 ACE_INLINE int
00919 ACE_Null_Mutex_Guard::remove (void)
00920 {
00921   return 0;
00922 }
00923 
00924 ACE_INLINE int
00925 ACE_Null_Mutex_Guard::locked (void)
00926 {
00927   return 1;
00928 }
00929 
00930 ACE_INLINE int
00931 ACE_Null_Mutex_Guard::acquire (void)
00932 {
00933   return 0;
00934 }
00935 
00936 ACE_INLINE int
00937 ACE_Null_Mutex_Guard::tryacquire (void)
00938 {
00939   return 0;
00940 }
00941 
00942 ACE_INLINE int
00943 ACE_Null_Mutex_Guard::release (void)
00944 {
00945   return 0;
00946 }
00947 
00948 ACE_INLINE void
00949 ACE_Null_Mutex_Guard::dump (void) const
00950 {
00951 }
00952 #endif /* ACE_USES_OBSOLETE_GUARD_CLASSES */
00953 
00954 ACE_INLINE
00955 ACE_TSS_Adapter::~ACE_TSS_Adapter (void)
00956 {
00957 }
00958 
00959 ACE_INLINE
00960 ACE_Manual_Event::~ACE_Manual_Event (void)
00961 {
00962 }
00963 
00964 ACE_INLINE
00965 ACE_Auto_Event::~ACE_Auto_Event (void)
00966 {
00967 }
00968 
00969 #if defined (ACE_HAS_THREADS)
00970 ACE_INLINE
00971 ACE_RW_Thread_Mutex::~ACE_RW_Thread_Mutex (void)
00972 {
00973 }
00974 
00975 ACE_INLINE
00976 ACE_Thread_Semaphore::~ACE_Thread_Semaphore (void)
00977 {
00978 }
00979 
00980 ACE_INLINE
00981 ACE_Sub_Barrier::~ACE_Sub_Barrier (void)
00982 {
00983 }
00984 
00985 ACE_INLINE
00986 ACE_Barrier::~ACE_Barrier (void)
00987 {
00988 }
00989 
00990 ACE_INLINE
00991 ACE_Thread_Barrier::~ACE_Thread_Barrier (void)
00992 {
00993 }
00994 #endif /* ACE_HAS_THREADS */
00995 

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