From 0acf3d1553b399a2b5d209232a2d8b32f86abc42 Mon Sep 17 00:00:00 2001 From: "Stephen D. Huston" Date: Tue, 17 Feb 2009 23:42:31 +0000 Subject: Initial Windows impl for PollableCondition git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/win-pollable-condition@745300 13f79535-47bb-0310-9956-ffa450edef68 --- qpid/cpp/src/common.vcproj | 1695 +++++++++++++------- .../cpp/src/qpid/sys/windows/PollableCondition.cpp | 123 ++ 2 files changed, 1215 insertions(+), 603 deletions(-) create mode 100644 qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp (limited to 'qpid/cpp') diff --git a/qpid/cpp/src/common.vcproj b/qpid/cpp/src/common.vcproj index e8c40da426..1effcbcdbe 100644 --- a/qpid/cpp/src/common.vcproj +++ b/qpid/cpp/src/common.vcproj @@ -1,25 +1,4 @@ - - @@ -169,7 +149,7 @@ /> @@ -244,7 +220,7 @@ /> + Filter="cpp;cxx;cc;C;c" + > + + + RelativePath="qpid\Address.cpp" + > + RelativePath="qpid\sys\AggregateOutput.cpp" + > + RelativePath="gen\qpid\framing\AllInvoker.cpp" + > + RelativePath="qpid\framing\AMQBody.cpp" + > + RelativePath="qpid\framing\AMQContentBody.cpp" + > + RelativePath="qpid\framing\AMQFrame.cpp" + > + RelativePath="qpid\framing\AMQHeaderBody.cpp" + > + RelativePath="qpid\framing\AMQHeartbeatBody.cpp" + > + RelativePath="qpid\framing\AMQMethodBody.cpp" + > + RelativePath="gen\qpid\framing\AMQP_AllProxy.cpp" + > + RelativePath="gen\qpid\framing\AMQP_ClientProxy.cpp" + > + RelativePath="qpid\framing\AMQP_HighestVersion.h" + > + RelativePath="gen\qpid\framing\AMQP_ServerProxy.cpp" + > + RelativePath="qpid\framing\Array.cpp" + > + RelativePath="qpid\assert.cpp" + > + RelativePath="qpid\assert.h" + > + RelativePath="qpid\sys\windows\AsynchIO.cpp" + > + RelativePath="qpid\sys\AsynchIOHandler.cpp" + > + RelativePath="qpid\framing\BodyHandler.cpp" + > + RelativePath="qpid\framing\Buffer.cpp" + > + RelativePath="gen\qpid\framing\ClientInvoker.cpp" + > + RelativePath="gen\qpid\framing\ClusterConfigChangeBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionAccumulatedAckBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionConsumerStateBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionDeliverCloseBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionDeliverDoOutputBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionDeliveryRecordBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionExchangeBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionMembershipBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionQueueBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionQueuePositionBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionSessionStateBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionShadowReadyBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxAcceptBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxDequeueBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxEndBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxEnqueueBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxPublishBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxStartBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterMessageExpiredBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterReadyBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterShutdownBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterUpdateOfferBody.cpp" + > + RelativePath="gen\qpid\framing\ClusterUpdateRequestBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionCloseBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionCloseOkBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionHeartbeatBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionOpenBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionOpenOkBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionRedirectBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionSecureBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionSecureOkBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionStartBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionStartOkBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionTuneBody.cpp" + > + RelativePath="gen\qpid\framing\ConnectionTuneOkBody.cpp" + > + RelativePath="qpid\DataDir.cpp" + > + RelativePath="gen\qpid\framing\DeliveryProperties.cpp" + > + RelativePath="qpid\sys\Dispatcher.cpp" + > + RelativePath="gen\qpid\framing\DtxCommitBody.cpp" + > + RelativePath="gen\qpid\framing\DtxEndBody.cpp" + > + RelativePath="gen\qpid\framing\DtxForgetBody.cpp" + > + RelativePath="gen\qpid\framing\DtxGetTimeoutBody.cpp" + > + RelativePath="gen\qpid\framing\DtxGetTimeoutResult.cpp" + > + RelativePath="gen\qpid\framing\DtxPrepareBody.cpp" + > + RelativePath="gen\qpid\framing\DtxRecoverBody.cpp" + > + RelativePath="gen\qpid\framing\DtxRecoverResult.cpp" + > + RelativePath="gen\qpid\framing\DtxRollbackBody.cpp" + > + RelativePath="gen\qpid\framing\DtxSelectBody.cpp" + > + RelativePath="gen\qpid\framing\DtxSetTimeoutBody.cpp" + > + RelativePath="gen\qpid\framing\DtxStartBody.cpp" + > + RelativePath="qpid\framing\Endian.cpp" + > + RelativePath="qpid\Exception.cpp" + > + RelativePath="gen\qpid\framing\ExchangeBindBody.cpp" + > + RelativePath="gen\qpid\framing\ExchangeBoundBody.cpp" + > + RelativePath="gen\qpid\framing\ExchangeBoundResult.cpp" + > + RelativePath="gen\qpid\framing\ExchangeDeclareBody.cpp" + > + RelativePath="gen\qpid\framing\ExchangeDeleteBody.cpp" + > + RelativePath="gen\qpid\framing\ExchangeQueryBody.cpp" + > + RelativePath="gen\qpid\framing\ExchangeQueryResult.cpp" + > + RelativePath="gen\qpid\framing\ExchangeUnbindBody.cpp" + > + RelativePath="gen\qpid\framing\ExecutionExceptionBody.cpp" + > + RelativePath="gen\qpid\framing\ExecutionResultBody.cpp" + > + RelativePath="gen\qpid\framing\ExecutionSyncBody.cpp" + > + RelativePath="qpid\framing\FieldTable.cpp" + > + RelativePath="qpid\framing\FieldValue.cpp" + > + RelativePath="gen\qpid\framing\FileAckBody.cpp" + > + RelativePath="gen\qpid\framing\FileCancelBody.cpp" + > + RelativePath="gen\qpid\framing\FileConsumeBody.cpp" + > + RelativePath="gen\qpid\framing\FileConsumeOkBody.cpp" + > + RelativePath="gen\qpid\framing\FileDeliverBody.cpp" + > + RelativePath="gen\qpid\framing\FileOpenBody.cpp" + > + RelativePath="gen\qpid\framing\FileOpenOkBody.cpp" + > + RelativePath="gen\qpid\framing\FileProperties.cpp" + > + RelativePath="gen\qpid\framing\FilePublishBody.cpp" + > + RelativePath="gen\qpid\framing\FileQosBody.cpp" + > + RelativePath="gen\qpid\framing\FileQosOkBody.cpp" + > + RelativePath="gen\qpid\framing\FileRejectBody.cpp" + > + RelativePath="gen\qpid\framing\FileReturnBody.cpp" + > + RelativePath="gen\qpid\framing\FileStageBody.cpp" + > + RelativePath="qpid\sys\windows\FileSysDir.cpp" + > + RelativePath="gen\qpid\framing\FragmentProperties.cpp" + > + RelativePath="qpid\framing\FrameDecoder.cpp" + > + RelativePath="qpid\framing\FrameSet.cpp" + > + RelativePath="gen\qpid\framing\Header.cpp" + > + RelativePath="qpid\sys\windows\IocpPoller.cpp" + > + RelativePath="qpid\sys\windows\IOHandle.cpp" + > + RelativePath="qpid\sys\LatencyMetric.cpp" + > + RelativePath="qpid\sys\windows\LockFile.cpp" + > + RelativePath="qpid\log\Logger.cpp" + > + RelativePath="qpid\management\Manageable.cpp" + > + RelativePath="qpid\management\ManagementObject.cpp" + > + RelativePath="gen\qpid\framing\MessageAcceptBody.cpp" + > + RelativePath="gen\qpid\framing\MessageAcquireBody.cpp" + > + RelativePath="gen\qpid\framing\MessageAcquireResult.cpp" + > + RelativePath="gen\qpid\framing\MessageCancelBody.cpp" + > + RelativePath="gen\qpid\framing\MessageFlowBody.cpp" + > + RelativePath="gen\qpid\framing\MessageFlushBody.cpp" + > + RelativePath="gen\qpid\framing\MessageProperties.cpp" + > + RelativePath="gen\qpid\framing\MessageRejectBody.cpp" + > + RelativePath="gen\qpid\framing\MessageReleaseBody.cpp" + > + RelativePath="gen\qpid\framing\MessageResumeBody.cpp" + > + RelativePath="gen\qpid\framing\MessageResumeResult.cpp" + > + RelativePath="gen\qpid\framing\MessageSetFlowModeBody.cpp" + > + RelativePath="gen\qpid\framing\MessageStopBody.cpp" + > + RelativePath="gen\qpid\framing\MessageSubscribeBody.cpp" + > + RelativePath="gen\qpid\framing\MessageTransferBody.cpp" + > + RelativePath="gen\qpid\framing\MethodBodyDefaultVisitor.cpp" + > + RelativePath="gen\qpid\framing\MethodBodyFactory.cpp" + > + RelativePath="qpid\Modules.cpp" + > + RelativePath="qpid\Options.cpp" + > + + + + + + + + + + + + + RelativePath="qpid\log\Options.cpp" + > + RelativePath="qpid\log\OstreamOutput.cpp" + > + RelativePath="qpid\Plugin.cpp" + > + RelativePath="qpid\pointer_to_other.h" + > + RelativePath=".\qpid\sys\windows\PollableCondition.cpp" + > + RelativePath="qpid\framing\ProtocolInitiation.cpp" + > + RelativePath="qpid\framing\ProtocolVersion.cpp" + > + RelativePath="qpid\framing\Proxy.cpp" + > + RelativePath="gen\qpid\framing\QueueDeclareBody.cpp" + > + RelativePath="gen\qpid\framing\QueueDeleteBody.cpp" + > + RelativePath="gen\qpid\framing\QueuePurgeBody.cpp" + > + RelativePath="gen\qpid\framing\QueueQueryBody.cpp" + > + RelativePath="gen\qpid\framing\QueueQueryResult.cpp" + > + RelativePath="qpid\RefCountedBuffer.cpp" + > + RelativePath="qpid\RefCountedBuffer.h" + > + RelativePath="gen\qpid\framing\reply_exceptions.cpp" + > + RelativePath="gen\qpid\framing\ReplyTo.cpp" + > + RelativePath="qpid\sys\Runnable.cpp" + > + RelativePath="qpid\log\Selector.cpp" + > + RelativePath="qpid\framing\SendContent.cpp" + > + RelativePath="qpid\framing\SequenceNumber.cpp" + > + RelativePath="qpid\framing\SequenceNumberSet.cpp" + > + RelativePath="qpid\framing\SequenceSet.cpp" + > + RelativePath="qpid\Serializer.h" + > + RelativePath="gen\qpid\framing\ServerInvoker.cpp" + > + RelativePath="gen\qpid\framing\SessionAttachBody.cpp" + > + RelativePath="gen\qpid\framing\SessionAttachedBody.cpp" + > + RelativePath="gen\qpid\framing\SessionCommandPointBody.cpp" + > + RelativePath="gen\qpid\framing\SessionCompletedBody.cpp" + > + RelativePath="gen\qpid\framing\SessionConfirmedBody.cpp" + > + RelativePath="gen\qpid\framing\SessionDetachBody.cpp" + > + RelativePath="gen\qpid\framing\SessionDetachedBody.cpp" + > + RelativePath="gen\qpid\framing\SessionExpectedBody.cpp" + > + RelativePath="gen\qpid\framing\SessionFlushBody.cpp" + > + RelativePath="gen\qpid\framing\SessionGapBody.cpp" + > + RelativePath="qpid\amqp_0_10\SessionHandler.cpp" + > + RelativePath="qpid\amqp_0_10\SessionHandler.h" + > + RelativePath="qpid\SessionId.cpp" + > + RelativePath="gen\qpid\framing\SessionKnownCompletedBody.cpp" + > + RelativePath="gen\qpid\framing\SessionRequestTimeoutBody.cpp" + > + RelativePath="qpid\SessionState.cpp" + > + RelativePath="qpid\SessionState.h" + > + RelativePath="gen\qpid\framing\SessionTimeoutBody.cpp" + > - - - - - - - - - - - - + RelativePath="qpid\sys\windows\Shlib.cpp" + > + + + + + + + + + + + + + RelativePath="qpid\sys\Shlib.cpp" + > + RelativePath="qpid\log\windows\SinkOptions.cpp" + > + RelativePath="qpid\sys\windows\Socket.cpp" + > + RelativePath="qpid\log\Statement.cpp" + > + RelativePath="gen\qpid\framing\StreamCancelBody.cpp" + > + RelativePath="gen\qpid\framing\StreamConsumeBody.cpp" + > + RelativePath="gen\qpid\framing\StreamConsumeOkBody.cpp" + > + RelativePath="gen\qpid\framing\StreamDeliverBody.cpp" + > + RelativePath="gen\qpid\framing\StreamProperties.cpp" + > + RelativePath="gen\qpid\framing\StreamPublishBody.cpp" + > + RelativePath="gen\qpid\framing\StreamQosBody.cpp" + > + RelativePath="gen\qpid\framing\StreamQosOkBody.cpp" + > + RelativePath="gen\qpid\framing\StreamReturnBody.cpp" + > + RelativePath="qpid\sys\windows\StrError.cpp" + > + RelativePath="qpid\StringUtils.cpp" + > + RelativePath="qpid\sys\windows\SystemInfo.cpp" + > + RelativePath="qpid\sys\windows\Thread.cpp" + > + RelativePath="qpid\sys\windows\Time.cpp" + > + RelativePath="qpid\sys\Timer.cpp" + > + RelativePath="qpid\framing\TransferContent.cpp" + > + RelativePath="gen\qpid\framing\TxCommitBody.cpp" + > - - - - - - - - - - - - + RelativePath="gen\qpid\framing\TxRollbackBody.cpp" + > + RelativePath="gen\qpid\framing\TxSelectBody.cpp" + > + RelativePath="gen\qpid\framing\TypeCode.cpp" + > + RelativePath="qpid\Url.cpp" + > + RelativePath="qpid\sys\windows\uuid.cpp" + > + + + + + + + + + + + + + RelativePath="qpid\framing\Uuid.cpp" + > - - - - - - - - - - - - + RelativePath="gen\qpid\framing\XaResult.cpp" + > + RelativePath="gen\qpid\framing\Xid.cpp" + > + Filter="h;hpp;hxx;hh" + > + RelativePath="qpid\framing\AccumulatedAck.h" + > + RelativePath="qpid\Address.h" + > + RelativePath="qpid\sys\AggregateOutput.h" + > + RelativePath="gen\qpid\framing\all_method_bodies.h" + > + RelativePath="gen\qpid\framing\AllInvoker.h" + > + RelativePath="qpid\framing\AMQBody.h" + > + RelativePath="qpid\framing\AMQCommandControlBody.h" + > + RelativePath="qpid\framing\AMQContentBody.h" + > + RelativePath="qpid\framing\AMQDataBlock.h" + > + RelativePath="qpid\framing\AMQFrame.h" + > + RelativePath="qpid\framing\AMQHeaderBody.h" + > + RelativePath="qpid\framing\AMQHeartbeatBody.h" + > + RelativePath="qpid\framing\AMQMethodBody.h" + > + RelativePath="gen\qpid\framing\AMQP_AllOperations.h" + > + RelativePath="gen\qpid\framing\AMQP_AllProxy.h" + > + RelativePath="gen\qpid\framing\AMQP_ClientOperations.h" + > + RelativePath="gen\qpid\framing\AMQP_ClientProxy.h" + > + RelativePath="qpid\framing\amqp_framing.h" + > + RelativePath="qpid\framing\AMQP_HighestVersion.h" + > + RelativePath="gen\qpid\framing\AMQP_ServerOperations.h" + > + RelativePath="gen\qpid\framing\AMQP_ServerProxy.h" + > + RelativePath="gen\qpid\framing\amqp_structs.h" + > + RelativePath="qpid\framing\amqp_types.h" + > + RelativePath="qpid\framing\amqp_types_full.h" + > + RelativePath="qpid\amqp_0_10\apply.h" + > + RelativePath="qpid\framing\Array.h" + > + RelativePath="qpid\assert.h" + > + RelativePath="qpid\sys\AsynchIO.h" + > + RelativePath="qpid\sys\AsynchIOHandler.h" + > + RelativePath="qpid\sys\windows\AsynchIoResult.h" + > + RelativePath="qpid\sys\AtomicCount.h" + > + RelativePath="qpid\sys\AtomicValue.h" + > + RelativePath="qpid\sys\BlockingQueue.h" + > + RelativePath="qpid\framing\BodyFactory.h" + > + RelativePath="qpid\framing\BodyHandler.h" + > + RelativePath="qpid\framing\Buffer.h" + > + RelativePath="qpid\framing\ChannelHandler.h" + > + RelativePath="qpid\sys\windows\check.h" + > + RelativePath="gen\qpid\framing\ClientInvoker.h" + > + RelativePath="gen\qpid\framing\ClusterConfigChangeBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionAccumulatedAckBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionConsumerStateBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionDeliverCloseBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionDeliverDoOutputBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionDeliveryRecordBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionExchangeBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionMembershipBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionQueueBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionQueuePositionBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionSessionStateBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionShadowReadyBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxAcceptBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxDequeueBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxEndBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxEnqueueBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxPublishBody.h" + > + RelativePath="gen\qpid\framing\ClusterConnectionTxStartBody.h" + > + RelativePath="gen\qpid\framing\ClusterMessageExpiredBody.h" + > + RelativePath="gen\qpid\framing\ClusterReadyBody.h" + > + RelativePath="gen\qpid\framing\ClusterShutdownBody.h" + > + RelativePath="gen\qpid\framing\ClusterUpdateOfferBody.h" + > + RelativePath="gen\qpid\framing\ClusterUpdateRequestBody.h" + > + RelativePath="qpid\sys\Codec.h" + > + RelativePath="qpid\sys\windows\Condition.h" + > + RelativePath="qpid\sys\Condition.h" + > + RelativePath="gen\qpid\framing\ConnectionCloseBody.h" + > + RelativePath="gen\qpid\framing\ConnectionCloseOkBody.h" + > + RelativePath="qpid\sys\ConnectionCodec.h" + > + RelativePath="gen\qpid\framing\ConnectionHeartbeatBody.h" + > + RelativePath="qpid\sys\ConnectionInputHandler.h" + > + RelativePath="qpid\sys\ConnectionInputHandlerFactory.h" + > + RelativePath="gen\qpid\framing\ConnectionOpenBody.h" + > + RelativePath="gen\qpid\framing\ConnectionOpenOkBody.h" + > + RelativePath="qpid\sys\ConnectionOutputHandler.h" + > + RelativePath="qpid\sys\ConnectionOutputHandlerPtr.h" + > + RelativePath="gen\qpid\framing\ConnectionRedirectBody.h" + > + RelativePath="gen\qpid\framing\ConnectionSecureBody.h" + > + RelativePath="gen\qpid\framing\ConnectionSecureOkBody.h" + > + RelativePath="gen\qpid\framing\ConnectionStartBody.h" + > + RelativePath="gen\qpid\framing\ConnectionStartOkBody.h" + > + RelativePath="gen\qpid\framing\ConnectionTuneBody.h" + > + RelativePath="gen\qpid\framing\ConnectionTuneOkBody.h" + > + RelativePath="gen\qpid\framing\constants.h" + > + RelativePath="qpid\sys\CopyOnWriteArray.h" + > + RelativePath="qpid\DataDir.h" + > + RelativePath="qpid\sys\DeletionManager.h" + > + RelativePath="gen\qpid\framing\DeliveryProperties.h" + > + RelativePath="qpid\sys\Dispatcher.h" + > + RelativePath="gen\qpid\framing\DtxCommitBody.h" + > + RelativePath="gen\qpid\framing\DtxEndBody.h" + > + RelativePath="gen\qpid\framing\DtxForgetBody.h" + > + RelativePath="gen\qpid\framing\DtxGetTimeoutBody.h" + > + RelativePath="gen\qpid\framing\DtxGetTimeoutResult.h" + > + RelativePath="gen\qpid\framing\DtxPrepareBody.h" + > + RelativePath="gen\qpid\framing\DtxRecoverBody.h" + > + RelativePath="gen\qpid\framing\DtxRecoverResult.h" + > + RelativePath="gen\qpid\framing\DtxRollbackBody.h" + > + RelativePath="gen\qpid\framing\DtxSelectBody.h" + > + RelativePath="gen\qpid\framing\DtxSetTimeoutBody.h" + > + RelativePath="gen\qpid\framing\DtxStartBody.h" + > + RelativePath="qpid\framing\Endian.h" + > + RelativePath="gen\qpid\framing\enum.h" + > + RelativePath="qpid\amqp_0_10\Exception.h" + > + RelativePath="qpid\Exception.h" + > + RelativePath="qpid\sys\ExceptionHolder.h" + > + RelativePath="gen\qpid\framing\ExchangeBindBody.h" + > + RelativePath="gen\qpid\framing\ExchangeBoundBody.h" + > + RelativePath="gen\qpid\framing\ExchangeBoundResult.h" + > + RelativePath="gen\qpid\framing\ExchangeDeclareBody.h" + > + RelativePath="gen\qpid\framing\ExchangeDeleteBody.h" + > + RelativePath="gen\qpid\framing\ExchangeQueryBody.h" + > + RelativePath="gen\qpid\framing\ExchangeQueryResult.h" + > + RelativePath="gen\qpid\framing\ExchangeUnbindBody.h" + > + RelativePath="gen\qpid\framing\ExecutionExceptionBody.h" + > + RelativePath="gen\qpid\framing\ExecutionResultBody.h" + > + RelativePath="gen\qpid\framing\ExecutionSyncBody.h" + > + RelativePath="qpid\framing\FieldTable.h" + > + RelativePath="qpid\framing\FieldValue.h" + > + RelativePath="gen\qpid\framing\FileAckBody.h" + > + RelativePath="gen\qpid\framing\FileCancelBody.h" + > + RelativePath="gen\qpid\framing\FileConsumeBody.h" + > + RelativePath="gen\qpid\framing\FileConsumeOkBody.h" + > + RelativePath="gen\qpid\framing\FileDeliverBody.h" + > + RelativePath="gen\qpid\framing\FileOpenBody.h" + > + RelativePath="gen\qpid\framing\FileOpenOkBody.h" + > + RelativePath="gen\qpid\framing\FileProperties.h" + > + RelativePath="gen\qpid\framing\FilePublishBody.h" + > + RelativePath="gen\qpid\framing\FileQosBody.h" + > + RelativePath="gen\qpid\framing\FileQosOkBody.h" + > + RelativePath="gen\qpid\framing\FileRejectBody.h" + > + RelativePath="gen\qpid\framing\FileReturnBody.h" + > + RelativePath="gen\qpid\framing\FileStageBody.h" + > + RelativePath="qpid\sys\FileSysDir.h" + > + RelativePath="gen\qpid\framing\FragmentProperties.h" + > + RelativePath="gen\qpid\framing\frame_body_lists.h" + > + RelativePath="qpid\framing\frame_functors.h" + > + RelativePath="qpid\framing\FrameDecoder.h" + > + RelativePath="qpid\framing\FrameDefaultVisitor.h" + > + RelativePath="qpid\framing\FrameHandler.h" + > + RelativePath="qpid\framing\FrameSet.h" + > + RelativePath="qpid\framing\Handler.h" + > + RelativePath="gen\qpid\framing\Header.h" + > + RelativePath="qpid\framing\HeaderProperties.h" + > + RelativePath="qpid\framing\variant.h qpid\log\Helpers.h" + > + RelativePath="qpid\framing\InitiationHandler.h" + > + RelativePath="qpid\InlineAllocator.h" + > + RelativePath="qpid\InlineVector.h" + > + RelativePath="qpid\framing\InputHandler.h" + > + RelativePath="qpid\sys\windows\IntegerTypes.h" + > + RelativePath="qpid\sys\IntegerTypes.h" + > + RelativePath="qpid\framing\Invoker.h" + > + RelativePath="qpid\sys\IOHandle.h" + > + RelativePath="qpid\sys\windows\IoHandlePrivate.h" + > + RelativePath="qpid\sys\LatencyMetric.h" + > + RelativePath="qpid\sys\LockFile.h" + > + RelativePath="qpid\sys\LockPtr.h" + > + RelativePath="qpid\log\Logger.h" + > + RelativePath="qpid\management\Manageable.h" + > + RelativePath="qpid\management\ManagementObject.h" + > + RelativePath="qpid\memory.h" + > + RelativePath="gen\qpid\framing\MessageAcceptBody.h" + > + RelativePath="gen\qpid\framing\MessageAcquireBody.h" + > + RelativePath="gen\qpid\framing\MessageAcquireResult.h" + > + RelativePath="gen\qpid\framing\MessageCancelBody.h" + > + RelativePath="gen\qpid\framing\MessageFlowBody.h" + > + RelativePath="gen\qpid\framing\MessageFlushBody.h" + > + RelativePath="gen\qpid\framing\MessageProperties.h" + > + RelativePath="gen\qpid\framing\MessageRejectBody.h" + > + RelativePath="gen\qpid\framing\MessageReleaseBody.h" + > + RelativePath="gen\qpid\framing\MessageResumeBody.h" + > + RelativePath="gen\qpid\framing\MessageResumeResult.h" + > + RelativePath="gen\qpid\framing\MessageSetFlowModeBody.h" + > + RelativePath="gen\qpid\framing\MessageStopBody.h" + > + RelativePath="gen\qpid\framing\MessageSubscribeBody.h" + > + RelativePath="gen\qpid\framing\MessageTransferBody.h" + > + RelativePath="gen\qpid\framing\MethodBodyConstVisitor.h" + > + RelativePath="gen\qpid\framing\MethodBodyDefaultVisitor.h" + > + RelativePath="qpid\framing\MethodBodyFactory.h" + > + RelativePath="qpid\framing\MethodContent.h" + > + RelativePath="qpid\framing\ModelMethod.h" + > + RelativePath="qpid\Modules.h" + > + RelativePath="qpid\sys\Monitor.h" + > + RelativePath="qpid\Msg.h" + > + RelativePath="qpid\sys\windows\Mutex.h" + > + RelativePath="qpid\sys\Mutex.h" + > + RelativePath="qpid\Options.h" + > + RelativePath="qpid\log\Options.h" + > + RelativePath="qpid\log\OstreamOutput.h" + > + RelativePath="qpid\sys\OutputControl.h" + > + RelativePath="qpid\framing\OutputHandler.h" + > + RelativePath="qpid\sys\OutputTask.h" + > + RelativePath="qpid\Plugin.h" + > + RelativePath="qpid\pointer_to_other.h" + > + RelativePath="qpid\sys\PollableCondition.h" + > + RelativePath="qpid\sys\PollableQueue.h" + > + RelativePath="qpid\sys\Poller.h" + > + RelativePath="qpid\sys\ProtocolFactory.h" + > + RelativePath="qpid\framing\ProtocolInitiation.h" + > + RelativePath="qpid\framing\ProtocolVersion.h" + > + RelativePath="qpid\framing\Proxy.h" + > + RelativePath="qpid\ptr_map.h" + > + RelativePath="gen\qpid\framing\QueueDeclareBody.h" + > + RelativePath="gen\qpid\framing\QueueDeleteBody.h" + > + RelativePath="gen\qpid\framing\QueuePurgeBody.h" + > + RelativePath="gen\qpid\framing\QueueQueryBody.h" + > + RelativePath="gen\qpid\framing\QueueQueryResult.h" + > + RelativePath="qpid\RangeSet.h" + > + RelativePath="qpid\RefCounted.h" + > + RelativePath="qpid\RefCountedBuffer.h" + > + RelativePath="gen\qpid\framing\reply_exceptions.h" + > + RelativePath="gen\qpid\framing\ReplyTo.h" + > + RelativePath="qpid\sys\Runnable.h" + > + RelativePath="qpid\sys\ScopedIncrement.h" + > + RelativePath="qpid\sys\SecurityLayer.h" + > + RelativePath="qpid\log\Selector.h" + > + RelativePath="qpid\sys\Semaphore.h" + > + RelativePath="qpid\framing\SendContent.h" + > + RelativePath="qpid\framing\SequenceNumber.h" + > + RelativePath="qpid\framing\SequenceNumberSet.h" + > + RelativePath="qpid\framing\SequenceSet.h" + > + RelativePath="qpid\Serializer.h" + > + RelativePath="gen\qpid\framing\ServerInvoker.h" + > + RelativePath="gen\qpid\framing\SessionAttachBody.h" + > + RelativePath="gen\qpid\framing\SessionAttachedBody.h" + > + RelativePath="gen\qpid\framing\SessionCommandPointBody.h" + > + RelativePath="gen\qpid\framing\SessionCompletedBody.h" + > + RelativePath="gen\qpid\framing\SessionConfirmedBody.h" + > + RelativePath="gen\qpid\framing\SessionDetachBody.h" + > + RelativePath="gen\qpid\framing\SessionDetachedBody.h" + > + RelativePath="gen\qpid\framing\SessionExpectedBody.h" + > + RelativePath="gen\qpid\framing\SessionFlushBody.h" + > + RelativePath="gen\qpid\framing\SessionGapBody.h" + > + RelativePath="qpid\amqp_0_10\SessionHandler.h" + > + RelativePath="qpid\SessionId.h" + > + RelativePath="gen\qpid\framing\SessionKnownCompletedBody.h" + > + RelativePath="gen\qpid\framing\SessionRequestTimeoutBody.h" + > + RelativePath="qpid\SessionState.h" + > + RelativePath="gen\qpid\framing\SessionTimeoutBody.h" + > + RelativePath="qpid\shared_ptr.h" + > + RelativePath="qpid\SharedObject.h" + > + RelativePath="qpid\sys\Shlib.h" + > + RelativePath="qpid\sys\ShutdownHandler.h" + > + RelativePath="qpid\log\windows\SinkOptions.h" + > + RelativePath="qpid\log\SinkOptions.h" + > + RelativePath="qpid\sys\Socket.h" + > + RelativePath="qpid\log\Statement.h" + > + RelativePath="qpid\sys\StateMonitor.h" + > + RelativePath="gen\qpid\framing\StreamCancelBody.h" + > + RelativePath="gen\qpid\framing\StreamConsumeBody.h" + > + RelativePath="gen\qpid\framing\StreamConsumeOkBody.h" + > + RelativePath="gen\qpid\framing\StreamDeliverBody.h" + > + RelativePath="gen\qpid\framing\StreamProperties.h" + > + RelativePath="gen\qpid\framing\StreamPublishBody.h" + > + RelativePath="gen\qpid\framing\StreamQosBody.h" + > + RelativePath="gen\qpid\framing\StreamQosOkBody.h" + > + RelativePath="gen\qpid\framing\StreamReturnBody.h" + > + RelativePath="qpid\sys\StrError.h" + > + RelativePath="qpid\StringUtils.h" + > + RelativePath="qpid\framing\StructHelper.h" + > + RelativePath="qpid\sys\SystemInfo.h" + > + RelativePath="qpid\sys\Thread.h" + > + RelativePath="qpid\sys\windows\Time.h" + > + RelativePath="qpid\sys\Time.h" + > + RelativePath="qpid\sys\TimeoutHandler.h" + > + RelativePath="qpid\sys\Timer.h" + > + RelativePath="qpid\framing\TransferContent.h" + > + RelativePath="gen\qpid\framing\TxCommitBody.h" + > + RelativePath="gen\qpid\framing\TxRollbackBody.h" + > + RelativePath="gen\qpid\framing\TxSelectBody.h" + > + RelativePath="gen\qpid\framing\TypeCode.h" + > + RelativePath="qpid\framing\TypeFilter.h" + > + RelativePath="qpid\Url.h" + > + RelativePath="qpid\framing\Uuid.h" + > + RelativePath="qpid\sys\windows\uuid.h" + > + RelativePath="qpid\sys\uuid.h" + > + RelativePath="qpid\Version.h" + > + RelativePath="qpid\framing\Visitor.h" + > + RelativePath="qpid\sys\Waitable.h" + > + RelativePath="gen\qpid\framing\XaResult.h" + > + RelativePath="gen\qpid\framing\Xid.h" + > diff --git a/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp b/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp new file mode 100644 index 0000000000..0fe4d5eeda --- /dev/null +++ b/qpid/cpp/src/qpid/sys/windows/PollableCondition.cpp @@ -0,0 +1,123 @@ +#ifndef QPID_SYS_WINDOWS_POLLABLECONDITION_CPP +#define QPID_SYS_WINDOWS_POLLABLECONDITION_CPP + +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ + +#include "qpid/sys/PollableCondition.h" +#include "qpid/sys/IOHandle.h" +#include "AsynchIoResult.h" +#include "IoHandlePrivate.h" + +#include +#include + +namespace qpid { +namespace sys { + +// PollableConditionPrivate will reuse the IocpPoller's ability to queue +// a completion to the IOCP and have it dispatched to the completer callback +// noted in the IOHandlePrivate when the request is queued. The +// AsynchCallbackRequest object is not really used - we already have the +// desired callback for the user of PollableCondition. +class PollableConditionPrivate : private IOHandle { + friend class PollableCondition; + +private: + PollableConditionPrivate(const sys::PollableCondition::Callback& cb, + sys::PollableCondition& parent, + const boost::shared_ptr& poller); + ~PollableConditionPrivate(); + + void poke(); + void dispatch(AsynchIoResult *result); + +private: + PollableCondition::Callback cb; + PollableCondition& parent; + boost::shared_ptr poller; + LONG isSet; + LONG armed; +}; + +PollableConditionPrivate::PollableConditionPrivate(const sys::PollableCondition::Callback& cb, + sys::PollableCondition& parent, + const boost::shared_ptr& poller) + : IOHandle(new sys::IOHandlePrivate(INVALID_SOCKET, + boost::bind(&PollableConditionPrivate::dispatch, this, _1))), + cb(cb), parent(parent), poller(poller), isSet(0), armed(0) +{ +} + +PollableConditionPrivate::~PollableConditionPrivate() +{ +} + +void PollableConditionPrivate::poke() +{ + if (!armed) + return; + + PollerHandle ph(*this); + poller->addFd(ph, Poller::INPUT); +} + +void PollableConditionPrivate::dispatch(AsynchIoResult *result) +{ + delete result; // Poller::addFd() allocates this + cb(parent); +} + + /* PollableCondition */ + +PollableCondition::PollableCondition(const Callback& cb, + const boost::shared_ptr& poller) + : impl(new PollableConditionPrivate(cb, *this, poller)) +{ +} + +PollableCondition::~PollableCondition() +{ + delete impl; +} + +void PollableCondition::set() { + // Add one to the set count and poke it to provoke a callback + ::InterlockedIncrement(&impl->isSet); + impl->poke(); +} + +bool PollableCondition::clear() { + return (0 != ::InterlockedExchange(&impl->isSet, 0)); +} + +void PollableCondition::disarm() { + ::InterlockedExchange(&impl->armed, 0); +} + +void PollableCondition::rearm() { + if (0 == ::InterlockedExchange(&impl->armed, 1) && impl->isSet) + impl->poke(); +} + +}} // namespace qpid::sys + +#endif /*!QPID_SYS_WINDOWS_POLLABLECONDITION_CPP*/ -- cgit v1.2.1