(file) Return to AsyncOpNode.h CVS log (file) (dir) Up to [Pegasus] / pegasus / src / Pegasus / Common

Diff for /pegasus/src/Pegasus/Common/AsyncOpNode.h between version 1.47 and 1.47.12.1

version 1.47, 2006/01/30 16:16:46 version 1.47.12.1, 2006/06/29 17:33:12
Line 44 
Line 44 
  
 #include <Pegasus/Common/Config.h> #include <Pegasus/Common/Config.h>
 #include <Pegasus/Common/Message.h> #include <Pegasus/Common/Message.h>
 #include <Pegasus/Common/internal_dq.h>  
 #include <Pegasus/Common/IPC.h> #include <Pegasus/Common/IPC.h>
 #include <Pegasus/Common/Linkage.h> #include <Pegasus/Common/Linkage.h>
   #include <Pegasus/Common/Linkable.h>
   #include <Pegasus/Common/List.h>
  
 PEGASUS_NAMESPACE_BEGIN PEGASUS_NAMESPACE_BEGIN
  
Line 88 
Line 89 
 class Cimom; class Cimom;
 class Thread; class Thread;
  
 class PEGASUS_COMMON_LINKAGE AsyncOpNode  class PEGASUS_COMMON_LINKAGE AsyncOpNode : public Linkable
 { {
  
 //     public: //     public:
Line 165 
Line 166 
    private:    private:
       Semaphore _client_sem;       Semaphore _client_sem;
       Mutex _mut;       Mutex _mut;
       unlocked_dq<Message> _request;        List<Message,NullLock> _request;
       unlocked_dq<Message> _response;        List<Message,NullLock> _response;
  
       Uint32 _state;       Uint32 _state;
       Uint32 _flags;       Uint32 _flags;
Line 183 
Line 184 
       struct timeval _timeout_interval;       struct timeval _timeout_interval;
  
       AsyncOpNode *_parent;       AsyncOpNode *_parent;
       unlocked_dq<AsyncOpNode> _children;        List<AsyncOpNode,NullLock> _children;
  
       void _reset(unlocked_dq<AsyncOpNode> *dst_q);        void _reset(List<AsyncOpNode,NullLock> *dst_q);
  
       // the lifetime member is for cache management by the cimom       // the lifetime member is for cache management by the cimom
       void _set_lifetime(struct timeval *lifetime) ;       void _set_lifetime(struct timeval *lifetime) ;
Line 286 
Line 287 
 { {
    AutoMutex autoMut(_mut);    AutoMutex autoMut(_mut);
    gettimeofday(&_updated, NULL);    gettimeofday(&_updated, NULL);
    if( false == _request.exists(reinterpret_cast<void *>(const_cast<Message *>(request))) )  
    _request.insert_last( const_cast<Message *>(request) ) ;  
  
 //   _request = const_cast<Message *>(request);     if (!_request.contains(request))
          _request.insert_back((Message*)request);
 } }
  
 inline Message * AsyncOpNode::get_request(void) inline Message * AsyncOpNode::get_request(void)
Line 297 
Line 297 
    Message *ret;    Message *ret;
    AutoMutex autoMut(_mut);    AutoMutex autoMut(_mut);
    gettimeofday(&_updated, NULL);    gettimeofday(&_updated, NULL);
    ret = _request.remove_first() ;     ret = _request.remove_front() ;
  
    return ret;    return ret;
 } }
Line 306 
Line 306 
 { {
    AutoMutex autoMut(_mut);    AutoMutex autoMut(_mut);
    gettimeofday(&_updated, NULL);    gettimeofday(&_updated, NULL);
    if (false == _response.exists(reinterpret_cast<void *>(const_cast<Message *>(response))))  
    _response.insert_last( const_cast<Message *>(response) );     if (!_response.contains(response))
          _response.insert_back((Message*)response);
 } }
  
 inline Message * AsyncOpNode::get_response(void) inline Message * AsyncOpNode::get_response(void)
Line 316 
Line 317 
  
    AutoMutex autoMut(_mut);    AutoMutex autoMut(_mut);
 //   gettimeofday(&_updated, NULL); //   gettimeofday(&_updated, NULL);
    ret = _response.remove_first();     ret = _response.remove_front();
 //   ret = _response; //   ret = _response;
  
    return ret;    return ret;
Line 441 
Line 442 
  
 inline Uint32 AsyncOpNode::_is_parent(void) inline Uint32 AsyncOpNode::_is_parent(void)
 { {
    return _children.count();     return _children.size();
 } }
  
 inline Boolean AsyncOpNode::_is_my_child(const AsyncOpNode & caller) const inline Boolean AsyncOpNode::_is_my_child(const AsyncOpNode & caller) const
Line 469 
Line 470 
    if(true == child->_is_child())    if(true == child->_is_child())
       throw Permission(pegasus_thread_self());       throw Permission(pegasus_thread_self());
    child->_parent = this;    child->_parent = this;
    _children.insert_last(child);     _children.insert_back(child);
 } }
  
 inline void AsyncOpNode::_disown_child(AsyncOpNode *child) inline void AsyncOpNode::_disown_child(AsyncOpNode *child)


Legend:
Removed from v.1.47  
changed lines
  Added in v.1.47.12.1

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2