Reference

ACE_recursive_thread_mutex_t(3)

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

NAME

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

SYNOPSIS

#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_;
};

DESCRIPTION

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.

AUTHOR

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

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