diff options
| author | Manuel Teira Paz <mteira@apache.org> | 2009-03-17 09:11:17 +0000 |
|---|---|---|
| committer | Manuel Teira Paz <mteira@apache.org> | 2009-03-17 09:11:17 +0000 |
| commit | 70497793cc2a01b7ce3f3741fea7619658bdf09d (patch) | |
| tree | 94450831c520aaa26de583cfde44c96372ae19ec /qpid/cpp/src | |
| parent | cfb70abb147ecb9e9ace913074488306c803f206 (diff) | |
| download | qpid-python-70497793cc2a01b7ce3f3741fea7619658bdf09d.tar.gz | |
Fixes to the Solaris ECFPoller: Extra trace logging and a misplaced event
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@755159 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src')
| -rw-r--r-- | qpid/cpp/src/qpid/sys/solaris/ECFPoller.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/qpid/cpp/src/qpid/sys/solaris/ECFPoller.cpp b/qpid/cpp/src/qpid/sys/solaris/ECFPoller.cpp index 71fbea27c2..f12012cbb0 100644 --- a/qpid/cpp/src/qpid/sys/solaris/ECFPoller.cpp +++ b/qpid/cpp/src/qpid/sys/solaris/ECFPoller.cpp @@ -203,6 +203,7 @@ class PollerPrivate { portId(::port_create()), isShutdown(false) { QPID_POSIX_CHECK(portId); + QPID_LOG(trace, "port_create returned port Id: " << portId); } ~PollerPrivate() { @@ -212,6 +213,7 @@ class PollerPrivate { //Send an Alarm to the port //We need to send a nonzero event mask, using POLLHUP, //nevertheless the wait method will only look for a PORT_ALERT_SET + QPID_LOG(trace, "Sending a port_alert to " << portId); QPID_POSIX_CHECK(::port_alert(portId, PORT_ALERT_SET, POLLHUP, &static_cast<PollerHandle&>(interruptHandle))); } @@ -342,13 +344,16 @@ Poller::Event Poller::wait(Duration timeout) { do { PollerHandleDeletionManager.markAllUnusedInThisThread(); - QPID_LOG(trace, "About to enter port_get. Thread " - << pthread_self() + QPID_LOG(trace, "About to enter port_get on " << impl->portId + << ". Thread " << pthread_self() << ", timeout=" << timeout); int rc = ::port_get(impl->portId, &pe, ptout); + QPID_LOG(trace, "port_get on " << impl->portId + << " returned " << rc); + if (impl->isShutdown) { PollerHandleDeletionManager.markAllUnusedInThisThread(); return Event(0, SHUTDOWN); @@ -369,9 +374,12 @@ Poller::Event Poller::wait(Duration timeout) { ScopedLock<Mutex> l(eh.lock); if (eh.isActive()) { + QPID_LOG(trace, "Handle is active"); //We use alert mode to notify interrupts if (pe.portev_source == PORT_SOURCE_ALERT && handle == &impl->interruptHandle) { + QPID_LOG(trace, "Interrupt notified"); + PollerHandle* wrappedHandle = impl->interruptHandle.getHandle(); if (impl->interruptHandle.queuedHandles()) { @@ -383,8 +391,6 @@ Poller::Event Poller::wait(Duration timeout) { return Event(wrappedHandle, INTERRUPTED); } - return Event(0, SHUTDOWN); - if (pe.portev_source == PORT_SOURCE_FD) { QPID_LOG(trace, "About to send handle: " << handle); if (pe.portev_events & POLLHUP) { |
