summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-21 23:50:34 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-21 23:50:34 +0000
commit70d1e221ae2105532a70fc3e53863db4598793f0 (patch)
treee89c54e19b752b63409bd29126fd13c7ea9b57eb
parent39e47f3e5a7df6ec5c237718e9a4019600f2d8a0 (diff)
downloadATCD-70d1e221ae2105532a70fc3e53863db4598793f0.tar.gz
inlined ACE_Null_Token ctor and dtor in class header because the clone () method needs the ctor inlined, and it's too difficult to get it right with macros
-rw-r--r--ace/Local_Tokens.h86
-rw-r--r--ace/Local_Tokens.i60
2 files changed, 68 insertions, 78 deletions
diff --git a/ace/Local_Tokens.h b/ace/Local_Tokens.h
index 62735e26876..d215ede2ba9 100644
--- a/ace/Local_Tokens.h
+++ b/ace/Local_Tokens.h
@@ -86,7 +86,7 @@ public:
// Null constructor.
ACE_TPQ_Entry (const ACE_Token_Proxy *proxy,
- const ASYS_TCHAR *client_id);
+ const ASYS_TCHAR *client_id);
// Construction.
ACE_TPQ_Entry (const ACE_TPQ_Entry &rhs);
@@ -175,7 +175,7 @@ class ACE_Export ACE_TSS_TPQ_Entry : public ACE_TPQ_ENTRY
// Not a public interface.
public:
ACE_TSS_TPQ_Entry (const ACE_Token_Proxy *proxy,
- const ASYS_TCHAR *client_id);
+ const ASYS_TCHAR *client_id);
// These are passed to the constructor of ACE_TPQ_Entry in
// make_TSS_TYPE
@@ -272,7 +272,7 @@ public:
// Destructor
void enqueue (ACE_TPQ_Entry* new_entry,
- int position);
+ int position);
// Enqueue a proxy, nesting level, client_id, and a magic cookie at
// the given position in the list. If the position is -1, we
// enqueue at the end of the list (I think).
@@ -334,15 +334,15 @@ public:
// Destructor
virtual int acquire (ACE_TPQ_Entry *caller,
- int ignore_deadlock,
- int notify) = 0;
+ int ignore_deadlock,
+ int notify) = 0;
// No implementation.
virtual int tryacquire (ACE_TPQ_Entry *caller) = 0;
// No implementation.
virtual int renew (ACE_TPQ_Entry *caller,
- int requeue_position) = 0;
+ int requeue_position) = 0;
// No implementation.
virtual int release (ACE_TPQ_Entry *caller) = 0;
@@ -460,8 +460,8 @@ public:
// token.
virtual int acquire (ACE_TPQ_Entry *caller,
- int ignore_deadlock,
- int notify);
+ int ignore_deadlock,
+ int notify);
// Returns 0 on success, -1 on failure with ACE_LOG_MSG->errnum() as
// the reason. If errnum == EWOULDBLOCK, and notify == 1,
// ACE_Token_Proxy::sleep_hook() has been called on the current owner
@@ -472,7 +472,7 @@ public:
// same as acquire, but fails if would block
virtual int renew (ACE_TPQ_Entry *caller,
- int requeue_position);
+ int requeue_position);
// An optimized method that efficiently reacquires the token if no
// other threads are waiting. This is useful for situations where
// you don't want to degrade the quality of service if there are
@@ -548,8 +548,8 @@ public:
// token.
virtual int acquire (ACE_TPQ_Entry *caller,
- int ignore_deadlock,
- int notify);
+ int ignore_deadlock,
+ int notify);
// Returns 0 on success, -1 on failure with ACE_LOG_MSG->errnum() as
// the reason. If errnum == EWOULDBLOCK, and notify == 1,
// ACE_Token_Proxy::sleep_hook() has been called on the current owner
@@ -560,7 +560,7 @@ public:
// same as acquire except fails on would block
virtual int renew (ACE_TPQ_Entry *caller,
- int requeue_position);
+ int requeue_position);
// An optimized method that efficiently reacquires the token if no
// other threads are waiting. This is useful for situations where
// you don't want to degrade the quality of service if there are
@@ -697,8 +697,8 @@ public:
// Death.
virtual int open (const ASYS_TCHAR *name,
- int ignore_deadlock = 0,
- int debug = 0);
+ int ignore_deadlock = 0,
+ int debug = 0);
// <name> is the string uniquely identifying the token.
// <ignore_deadlock> can be 1 to disable deadlock notifications.
// <debug> prints debug messages.
@@ -711,15 +711,15 @@ public:
// multiple proxies to the same token.
virtual int acquire (int notify = 0,
- void (*sleep_hook)(void *) = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
+ void (*sleep_hook)(void *) = 0,
+ ACE_Synch_Options &options =
+ ACE_Synch_Options::defaults);
// Calls acquire on the token. Blocks the calling thread if would
// block.
virtual int renew (int requeue_position = -1,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
+ ACE_Synch_Options &options =
+ ACE_Synch_Options::defaults);
// Calls renew on the token. Blocks the calling thread if would
// block.
@@ -727,24 +727,24 @@ public:
// Calls renew on the token.
virtual int release (ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
+ ACE_Synch_Options::defaults);
// Calls release on the token.
virtual int remove (ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
+ ACE_Synch_Options::defaults);
// Calls remove on the token.
virtual int acquire_read (int notify = 0,
- void (*sleep_hook)(void *) = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
+ void (*sleep_hook)(void *) = 0,
+ ACE_Synch_Options &options =
+ ACE_Synch_Options::defaults);
// Since the locking mechanism doesn't support read locks then this
// just calls <acquire>.
virtual int acquire_write (int notify = 0,
- void (*sleep_hook)(void *) = 0,
- ACE_Synch_Options &options =
- ACE_Synch_Options::defaults);
+ void (*sleep_hook)(void *) = 0,
+ ACE_Synch_Options &options =
+ ACE_Synch_Options::defaults);
// Since the locking mechanism doesn't support write locks then this
// just calls <acquire>.
@@ -814,7 +814,7 @@ protected:
// proxies can reference the same ACE_Mutex_Token.
int handle_options (ACE_Synch_Options &options,
- ACE_TOKEN_CONST::COND_VAR &cv);
+ ACE_TOKEN_CONST::COND_VAR &cv);
// Handles cond_var waits.
ACE_TSS_TPQ_Entry waiter_;
@@ -831,32 +831,32 @@ class ACE_Export ACE_Null_Token : public ACE_Token_Proxy
// = TITLE
// No op class for nonthreaded platform protocols.
public:
- ACE_INLINE_FOR_GNUC ACE_Null_Token (void);
+ ACE_Null_Token (void) {}
// Construction.
- ~ACE_Null_Token (void);
+ ~ACE_Null_Token (void) {}
// Destructor
virtual int acquire (int /* notify */ = 0,
- void (* /* sleep_hook */ )(void *) = 0,
- ACE_Synch_Options & /* options */ =
- ACE_Synch_Options::defaults) { return 0; }
+ void (* /* sleep_hook */ )(void *) = 0,
+ ACE_Synch_Options & /* options */ =
+ ACE_Synch_Options::defaults) { return 0; }
// Acquire.
virtual int renew (int /* requeue_position */ = -1,
- ACE_Synch_Options & /* options */ =
- ACE_Synch_Options::defaults) { return 0; }
+ ACE_Synch_Options & /* options */ =
+ ACE_Synch_Options::defaults) { return 0; }
// Renew.
virtual int tryacquire (void (* /* sleep_hook */)(void *) = 0) { return 0; }
// Try acquire.
virtual int release (ACE_Synch_Options & /* options */ =
- ACE_Synch_Options::defaults) { return 0; }
+ ACE_Synch_Options::defaults) { return 0; }
// Release.
virtual int remove (ACE_Synch_Options & /* options */ =
- ACE_Synch_Options::defaults) { return 0; }
+ ACE_Synch_Options::defaults) { return 0; }
// Remove.
virtual ACE_Token_Proxy *clone (void) const { return new ACE_Null_Token; }
@@ -891,8 +891,8 @@ class ACE_Export ACE_Local_Mutex : public ACE_Token_Proxy
// ACE_Local_Mutex are that of a mutex.
public:
ACE_Local_Mutex (const ASYS_TCHAR *token_name = 0,
- int ignore_deadlock = 0,
- int debug = 0);
+ int ignore_deadlock = 0,
+ int debug = 0);
// <token_name> uniquely id's the token.
// <ignore_deadlock> will allow deadlock to occur (useful for
// testing). <debug> prints a bunch of messages.
@@ -941,8 +941,8 @@ public:
// = Initialization and termination.
ACE_Local_RLock (const ASYS_TCHAR *token_name = 0,
- int ignore_deadlock = 0,
- int debug = 0);
+ int ignore_deadlock = 0,
+ int debug = 0);
// <token_name> uniquely id's the token.
// <ignore_deadlock> will allow deadlock to occur (useful for
// testing). <debug> prints a bunch of messages.
@@ -994,8 +994,8 @@ public:
// = Initialization and termination.
ACE_Local_WLock (const ASYS_TCHAR *token_name = 0,
- int ignore_deadlock = 0,
- int debug = 0);
+ int ignore_deadlock = 0,
+ int debug = 0);
// <token_name> uniquely id's the token.
// <ignore_deadlock> will allow deadlock to occur (useful for
// testing). <debug> prints a bunch of messages.
diff --git a/ace/Local_Tokens.i b/ace/Local_Tokens.i
index 2af8cf5fc45..676b0e58cf3 100644
--- a/ace/Local_Tokens.i
+++ b/ace/Local_Tokens.i
@@ -13,22 +13,22 @@ ACE_Token_Proxy::type (void) const
ACE_INLINE int
ACE_Token_Proxy::acquire_read (int notify,
- void (*sleep_hook)(void *),
- ACE_Synch_Options &options)
+ void (*sleep_hook)(void *),
+ ACE_Synch_Options &options)
{
return this->acquire (notify,
- sleep_hook,
- options);
+ sleep_hook,
+ options);
}
ACE_INLINE int
ACE_Token_Proxy::acquire_write (int notify,
- void (*sleep_hook)(void *),
- ACE_Synch_Options &options)
+ void (*sleep_hook)(void *),
+ ACE_Synch_Options &options)
{
return this->acquire (notify,
- sleep_hook,
- options);
+ sleep_hook,
+ options);
}
ACE_INLINE int
@@ -124,7 +124,7 @@ ACE_Tokens::dec_reference (void)
ACE_DEBUG ((LM_DEBUG, ASYS_TEXT ("dec_reference already zero")));
return 0;
}
-
+
return --this->reference_count_;
}
@@ -289,8 +289,8 @@ ACE_TPQ_Entry::equal_client_id (const ASYS_TCHAR *id)
ACE_INLINE
ACE_Local_Mutex::ACE_Local_Mutex (const ASYS_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
+ int ignore_deadlock,
+ int debug)
{
ACE_TRACE ("ACE_Local_Mutex::ACE_Local_Mutex");
this->open (token_name, ignore_deadlock, debug);
@@ -322,9 +322,9 @@ ACE_Token_Name::name (void) const
ACE_INLINE ACE_Token_Proxy *
ACE_Local_Mutex::clone (void) const
{
- return new ACE_Local_Mutex (token_->name (),
- ignore_deadlock_,
- debug_);
+ return new ACE_Local_Mutex (token_->name (),
+ ignore_deadlock_,
+ debug_);
}
ACE_INLINE ACE_Tokens *
@@ -334,16 +334,6 @@ ACE_Local_Mutex::create_token (const ASYS_TCHAR *name)
}
ACE_INLINE
-ACE_Null_Token::ACE_Null_Token (void)
-{
-}
-
-ACE_INLINE
-ACE_Null_Token::~ACE_Null_Token (void)
-{
-}
-
-ACE_INLINE
ACE_Local_Mutex::~ACE_Local_Mutex (void)
{
}
@@ -352,8 +342,8 @@ ACE_Local_Mutex::~ACE_Local_Mutex (void)
ACE_INLINE
ACE_Local_RLock::ACE_Local_RLock (const ASYS_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
+ int ignore_deadlock,
+ int debug)
{
ACE_TRACE ("ACE_Local_RLock::ACE_Local_RLock");
this->open (token_name, ignore_deadlock, debug);
@@ -379,17 +369,17 @@ ACE_Local_RLock::type (void) const
ACE_INLINE ACE_Token_Proxy *
ACE_Local_RLock::clone (void) const
{
- return new ACE_Local_RLock (token_->name (),
- ignore_deadlock_,
- debug_);
+ return new ACE_Local_RLock (token_->name (),
+ ignore_deadlock_,
+ debug_);
}
// ************************************************************
ACE_INLINE
ACE_Local_WLock::ACE_Local_WLock (const ASYS_TCHAR *token_name,
- int ignore_deadlock,
- int debug)
+ int ignore_deadlock,
+ int debug)
{
ACE_TRACE ("ACE_Local_WLock::ACE_Local_WLock");
this->open (token_name, ignore_deadlock, debug);
@@ -415,15 +405,15 @@ ACE_Local_WLock::type (void) const
ACE_INLINE ACE_Token_Proxy *
ACE_Local_WLock::clone (void) const
{
- return new ACE_Local_WLock (token_->name (),
- ignore_deadlock_,
- debug_);
+ return new ACE_Local_WLock (token_->name (),
+ ignore_deadlock_,
+ debug_);
}
// ************************************************************
-ACE_INLINE void
+ACE_INLINE void
ACE_Token_Name::operator= (const ACE_Token_Name &rhs)
{
ACE_TRACE ("ACE_Token_Name::operator=");