ACE_recursive_thread_mutex_t(3)

ACE_recursive_thread_mutex_t3

Implement a thin c++ wrapper that allows nested acquisition and release of a mutex that occurs in the same thread.

Usage

#include <ace/OS.h>
class ACE_recursive_thread_mutex_t
{
  public:
    ACE_thread_mutex_t nesting_mutex_;
    ACE_cond_t lock_available_;
    int nesting_level_;
    ACE_thread_t owner_id_;
};

Overview

This implementation is based on an algorithm sketched by Dave Butenhof [email protected]. Naturally, I take the credit for any mistakes ;-)

Public members

ACE_thread_mutex_t nesting_mutex_;

Guards the state of the nesting level and thread id.

ACE_cond_t lock_available_;

This condition variable suspends other waiting threads until the mutex is available.

int nesting_level_;

Current nesting level of the recursion.

ACE_thread_t owner_id_;

Current owner of the lock.

The ACE_Sched_Priority type should be used for platform-

independent thread and process priorities, by convention. int should be used for OS-specific priorities.

typedef for the _stat data structure

Giving unique ACE scoped names for some important

RTSignal-Related constants. Becuase sometimes, different platforms use different names for these constants.

Library

ace

Author

Doug Schmidt [email protected], Jesper S. M|ller [email protected], and a cast of thousands...

From libace-doc 5.0.7-4 in Debian 2.2 (Potato). Parsed by carta from the page's man source.