summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
authorManuel Teira Paz <mteira@apache.org>2009-03-17 09:11:17 +0000
committerManuel Teira Paz <mteira@apache.org>2009-03-17 09:11:17 +0000
commit416cca89e9291960b58ae8acacc4ec306cb50ab5 (patch)
tree6db2c296c5ca1e004f0ef32fa140f06fa56f5776 /cpp/src
parente57b9c7793b633747da1461832b336c4b2b3b2e9 (diff)
downloadqpid-python-416cca89e9291960b58ae8acacc4ec306cb50ab5.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/qpid@755159 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/sys/solaris/ECFPoller.cpp14
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) {