diff options
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/qpid/sys/solaris/ECFPoller.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/cpp/src/qpid/sys/solaris/ECFPoller.cpp b/cpp/src/qpid/sys/solaris/ECFPoller.cpp index 71fbea27c2..f12012cbb0 100644 --- a/cpp/src/qpid/sys/solaris/ECFPoller.cpp +++ b/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) { |