Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 51762 invoked from network); 24 Nov 2009 14:31:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Nov 2009 14:31:59 -0000 Received: (qmail 69538 invoked by uid 500); 24 Nov 2009 14:31:59 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 69490 invoked by uid 500); 24 Nov 2009 14:31:59 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 69481 invoked by uid 99); 24 Nov 2009 14:31:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Nov 2009 14:31:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Nov 2009 14:31:54 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D406123888D6; Tue, 24 Nov 2009 14:31:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r883703 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/ main/decaf/internal/util/concurrent/ test/ test/decaf/internal/util/concurrent/ Date: Tue, 24 Nov 2009 14:31:32 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091124143132.D406123888D6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: tabish Date: Tue Nov 24 14:31:31 2009 New Revision: 883703 URL: http://svn.apache.org/viewvc?rev=883703&view=rev Log: Add some basic work on Transferer classes for use in a SynchronousQueue Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferQueue.h (with props) activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferStack.h (with props) activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.cpp (with props) activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.h (with props) activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.cpp (with props) activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.h (with props) Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Transferer.h activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am?rev=883703&r1=883702&r2=883703&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/Makefile.am Tue Nov 24 14:31:31 2009 @@ -1106,6 +1106,8 @@ decaf/internal/util/concurrent/ConditionImpl.h \ decaf/internal/util/concurrent/MutexImpl.h \ decaf/internal/util/concurrent/SynchronizableImpl.h \ + decaf/internal/util/concurrent/TransferQueue.h \ + decaf/internal/util/concurrent/TransferStack.h \ decaf/internal/util/concurrent/Transferer.h \ decaf/internal/util/concurrent/unix/ConditionHandle.h \ decaf/internal/util/concurrent/unix/MutexHandle.h \ Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferQueue.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferQueue.h?rev=883703&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferQueue.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferQueue.h Tue Nov 24 14:31:31 2009 @@ -0,0 +1,348 @@ +/* + * 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. + */ + +#ifndef _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERQUEUE_H_ +#define _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERQUEUE_H_ + +#include + +#include +#include +#include +#include + +#include + +namespace decaf { +namespace internal { +namespace util { +namespace concurrent { + + using decaf::util::concurrent::atomic::AtomicReference; + + /** + * This extends Scherer-Scott dual queue algorithm, differing, + * among other ways, by using modes within nodes rather than + * marked pointers. The algorithm is a little simpler than + * that for stacks because fulfillers do not need explicit + * nodes, and matching is done by CAS'ing QNode.item field + * from non-null to null (for put) or vice versa (for take). + */ + template< typename E > + class TransferQueue : public Transferer { + private: + +// /** Node class for TransferQueue. */ +// class QNode { +// private: +// +// AtomicReference next; // next node in queue +// volatile decaf::lang::Thread* waiter; // to control park/unpark +// AtomicReference item; // CAS'ed to or from null +// +// bool data; +// bool cancelled; +// +// public: +// +// QNode() : cancelled( false ), data( false ) { +// } +// +// QNode( E* item ) : cancelled( false ), data( true ) { +// this->item.set( item ); +// } +// +// bool casNext( QNode* cmp, QNode* val ) { +// return ( this->next == cmp && this->next.compareAndSet( cmp, val ) ); +// } +// +// bool casItem( E* cmp, E* val ) { +// return ( this->item == cmp && this->item.compareAndSet( cmp, val ) ); +// } +// +// /** +// * Tries to cancel by CAS'ing ref to NULL if that succeeds then we mark as cancelled. +// */ +// void tryCancel( E* cmp ) { +// if( item.compareAndSet( cmp, NULL ) ) { +// this->cancelled = true; +// } +// } +// +// bool isCancelled() { +// return this->item == this; +// } +// +// /** +// * Returns true if this node is known to be off the queue +// * because its next pointer has been forgotten due to +// * an advanceHead operation. +// */ +// bool isOffList() { +// return this->next == NULL; +// } +// }; + + private: + +// decaf::util::concurrent::atomic::AtomicReference head; +// decaf::util::concurrent::atomic::AtomicReference tail; +// +// decaf::util::concurrent::atomic::AtomicReference cleanMe; + + public: + + TransferQueue() { +// // Initialize with a dummy Node. +// this->head.set( new QNode() ); +// this->tail.set( this->head.get() ); + } + + virtual ~TransferQueue() {} + + virtual void transfer( E* e, bool timed, long long nanos ) + throw( decaf::util::concurrent::TimeoutException, + decaf::lang::exceptions::InterruptedException ) + { + + } + + virtual E* transfer( bool timed, long long nanos ) + throw( decaf::util::concurrent::TimeoutException, + decaf::lang::exceptions::InterruptedException ) + { + return NULL; + } + + /** + * Puts or takes an item. + */ +// E* transfer( E* e, bool timed, long long nanos ) { + + /* Basic algorithm is to loop trying to take either of + * two actions: + * + * 1. If queue apparently empty or holding same-mode nodes, + * try to add node to queue of waiters, wait to be + * fulfilled (or cancelled) and return matching item. + * + * 2. If queue apparently contains waiting items, and this + * call is of complementary mode, try to fulfill by CAS'ing + * item field of waiting node and dequeuing it, and then + * returning matching item. + * + * In each case, along the way, check for and try to help + * advance head and tail on behalf of other stalled/slow + * threads. + * + * The loop starts off with a null check guarding against + * seeing uninitialized head or tail values. This never + * happens in current SynchronousQueue, but could if + * callers held non-volatile/final ref to the + * transferer. The check is here anyway because it places + * null checks at top of loop, which is usually faster + * than having them implicitly interspersed. + */ + +// QNode s = null; // constructed/reused as needed +// boolean isData = (e != null); +// +// for (;;) { +// QNode t = tail; +// QNode h = head; +// if (t == null || h == null) // saw uninitialized value +// continue; // spin +// +// if (h == t || t.isData == isData) { // empty or same-mode +// QNode tn = t.next; +// if (t != tail) // inconsistent read +// continue; +// if (tn != null) { // lagging tail +// advanceTail(t, tn); +// continue; +// } +// if (timed && nanos <= 0) // can't wait +// return null; +// if (s == null) +// s = new QNode(e, isData); +// if (!t.casNext(null, s)) // failed to link in +// continue; +// +// advanceTail(t, s); // swing tail and wait +// Object x = awaitFulfill(s, e, timed, nanos); +// if (x == s) { // wait was cancelled +// clean(t, s); +// return null; +// } +// +// if (!s.isOffList()) { // not already unlinked +// advanceHead(t, s); // unlink if head +// if (x != null) // and forget fields +// s.item = s; +// s.waiter = null; +// } +// return (x != null)? x : e; +// +// } else { // complementary-mode +// QNode m = h.next; // node to fulfill +// if (t != tail || m == null || h != head) +// continue; // inconsistent read +// +// Object x = m.item; +// if (isData == (x != null) || // m already fulfilled +// x == m || // m cancelled +// !m.casItem(x, e)) { // lost CAS +// advanceHead(h, m); // dequeue and retry +// continue; +// } +// +// advanceHead(h, m); // successfully fulfilled +// LockSupport.unpark(m.waiter); +// return (x != null)? x : e; +// } +// } +// } + + private: + + /** + * Spins/blocks until node s is fulfilled. + * + * @param s the waiting node + * @param e the comparison value for checking match + * @param timed true if timed wait + * @param nanos timeout value + * @return matched item, or s if cancelled + */ +// Object awaitFulfill(QNode s, Object e, boolean timed, long nanos) { +// /* Same idea as TransferStack.awaitFulfill */ +// long lastTime = (timed)? System.nanoTime() : 0; +// Thread w = Thread.currentThread(); +// int spins = ((head.next == s) ? +// (timed? maxTimedSpins : maxUntimedSpins) : 0); +// for (;;) { +// if (w.isInterrupted()) +// s.tryCancel(e); +// Object x = s.item; +// if (x != e) +// return x; +// if (timed) { +// long now = System.nanoTime(); +// nanos -= now - lastTime; +// lastTime = now; +// if (nanos <= 0) { +// s.tryCancel(e); +// continue; +// } +// } +// if (spins > 0) +// --spins; +// else if (s.waiter == null) +// s.waiter = w; +// else if (!timed) +// LockSupport.park(); +// else if (nanos > spinForTimeoutThreshold) +// LockSupport.parkNanos(nanos); +// } +// } + + /** + * Gets rid of cancelled node s with original predecessor pred. + */ +// void clean(QNode pred, QNode s) { +// s.waiter = null; // forget thread +// /* +// * At any given time, exactly one node on list cannot be +// * deleted -- the last inserted node. To accommodate this, +// * if we cannot delete s, we save its predecessor as +// * "cleanMe", deleting the previously saved version +// * first. At least one of node s or the node previously +// * saved can always be deleted, so this always terminates. +// */ +// while (pred.next == s) { // Return early if already unlinked +// QNode h = head; +// QNode hn = h.next; // Absorb cancelled first node as head +// if (hn != null && hn.isCancelled()) { +// advanceHead(h, hn); +// continue; +// } +// QNode t = tail; // Ensure consistent read for tail +// if (t == h) +// return; +// QNode tn = t.next; +// if (t != tail) +// continue; +// if (tn != null) { +// advanceTail(t, tn); +// continue; +// } +// if (s != t) { // If not tail, try to unsplice +// QNode sn = s.next; +// if (sn == s || pred.casNext(s, sn)) +// return; +// } +// QNode dp = cleanMe; +// if (dp != null) { // Try unlinking previous cancelled node +// QNode d = dp.next; +// QNode dn; +// if (d == null || // d is gone or +// d == dp || // d is off list or +// !d.isCancelled() || // d not cancelled or +// (d != t && // d not tail and +// (dn = d.next) != null && // has successor +// dn != d && // that is on list +// dp.casNext(d, dn))) // d unspliced +// casCleanMe(dp, null); +// if (dp == pred) +// return; // s is already saved node +// } else if (casCleanMe(null, pred)) +// return; // Postpone cleaning s +// } +// } + +// /** +// * Tries to cas nh as new head; if successful, unlink +// * old head's next node to avoid garbage retention. +// */ +// void advanceHead( QNode* h, QNode* nh ) { +// if( h == head.get() && this->head.compareAndSet( h, nh ) ) { +// h->next = h; // forget old next +// } +// } +// +// /** +// * Tries to cas nt as new tail. +// */ +// void advanceTail( QNode* t, QNode* nt ) { +// if( this->tail.get() == t ) { +// this->tail.compareAndSet( t, nt ); +// } +// } +// +// /** +// * Tries to CAS cleanMe slot. +// */ +// bool casCleanMe( QNode* cmp, QNode* val ) { +// return ( this->cleanMe.get() == cmp && +// this->cleanMe.compareAndSet( cmp, val ) ); +// } + + }; + +}}}} + +#endif /* _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERQUEUE_H_ */ Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferQueue.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferStack.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferStack.h?rev=883703&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferStack.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferStack.h Tue Nov 24 14:31:31 2009 @@ -0,0 +1,56 @@ +/* + * 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. + */ + +#ifndef _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERSTACK_H_ +#define _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERSTACK_H_ + +#include + +#include +#include + +namespace decaf { +namespace internal { +namespace util { +namespace concurrent { + + template + class TransferStack : public Transferer { + public: + + TransferStack() {} + virtual ~TransferStack() {} + + virtual void transfer( E* e, bool timed, long long nanos ) + throw( decaf::util::concurrent::TimeoutException, + decaf::lang::exceptions::InterruptedException ) + { + + } + + virtual E* transfer( bool timed, long long nanos ) + throw( decaf::util::concurrent::TimeoutException, + decaf::lang::exceptions::InterruptedException ) + { + return NULL; + } + + }; + +}}}} + +#endif /* _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERSTACK_H_ */ Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/TransferStack.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Transferer.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Transferer.h?rev=883703&r1=883702&r2=883703&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Transferer.h (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/internal/util/concurrent/Transferer.h Tue Nov 24 14:31:31 2009 @@ -15,21 +15,21 @@ * limitations under the License. */ - #ifndef _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERER_H_ #define _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERER_H_ #include #include -namespace decaf{ -namespace util{ -namespace concurrent{ +namespace decaf { +namespace internal { +namespace util { +namespace concurrent { /** * Shared internal API for dual stacks and queues. */ - template + template< typename E > class Transferer { /** @@ -44,7 +44,7 @@ * @throws InterruptedException if the thread was interrupted while * waiting for the consumer to accept the item offered. */ - virtual void transfer( E e, bool timed, long long nanos ) + virtual void transfer( E* e, bool timed, long long nanos ) throw( decaf::util::concurrent::TimeoutException, decaf::lang::exceptions::InterruptedException ) = 0; @@ -61,12 +61,12 @@ * @throws InterruptedException if the thread was interrupted while * waiting for the producer to offer an item. */ - virtual E transfer( bool timed, long long nanos ) + virtual E* transfer( bool timed, long long nanos ) throw( decaf::util::concurrent::TimeoutException, decaf::lang::exceptions::InterruptedException ) = 0; }; -}}} +}}}} #endif /* _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERER_H_ */ Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am?rev=883703&r1=883702&r2=883703&view=diff ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am (original) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am Tue Nov 24 14:31:31 2009 @@ -80,6 +80,8 @@ decaf/internal/nio/ShortArrayBufferTest.cpp \ decaf/internal/util/ByteArrayAdapterTest.cpp \ decaf/internal/util/TimerTaskHeapTest.cpp \ + decaf/internal/util/concurrent/TransferQueueTest.cpp \ + decaf/internal/util/concurrent/TransferStackTest.cpp \ decaf/io/BufferedInputStreamTest.cpp \ decaf/io/BufferedOutputStreamTest.cpp \ decaf/io/ByteArrayInputStreamTest.cpp \ @@ -208,6 +210,8 @@ decaf/internal/nio/ShortArrayBufferTest.h \ decaf/internal/util/ByteArrayAdapterTest.h \ decaf/internal/util/TimerTaskHeapTest.h \ + decaf/internal/util/concurrent/TransferQueueTest.h \ + decaf/internal/util/concurrent/TransferStackTest.h \ decaf/io/BufferedInputStreamTest.h \ decaf/io/BufferedOutputStreamTest.h \ decaf/io/ByteArrayInputStreamTest.h \ Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.cpp?rev=883703&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.cpp Tue Nov 24 14:31:31 2009 @@ -0,0 +1,39 @@ +/* + * 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 "TransferQueueTest.h" + +#include + +using namespace decaf; +using namespace decaf::internal; +using namespace decaf::internal::util; +using namespace decaf::internal::util::concurrent; + +//////////////////////////////////////////////////////////////////////////////// +TransferQueueTest::TransferQueueTest() { +} + +//////////////////////////////////////////////////////////////////////////////// +TransferQueueTest::~TransferQueueTest() { +} + +//////////////////////////////////////////////////////////////////////////////// +void TransferQueueTest::test() { + + TransferQueue queue; +} Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.h?rev=883703&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.h Tue Nov 24 14:31:31 2009 @@ -0,0 +1,48 @@ +/* + * 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. + */ + +#ifndef _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERQUEUETEST_H_ +#define _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERQUEUETEST_H_ + +#include +#include + +#include + +namespace decaf { +namespace internal { +namespace util { +namespace concurrent { + + class TransferQueueTest : public CppUnit::TestFixture { + + CPPUNIT_TEST_SUITE( TransferQueueTest ); + CPPUNIT_TEST( test ); + CPPUNIT_TEST_SUITE_END(); + + public: + + TransferQueueTest(); + virtual ~TransferQueueTest(); + + void test(); + + }; + +}}}} + +#endif /* _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERQUEUETEST_H_ */ Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferQueueTest.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.cpp?rev=883703&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.cpp Tue Nov 24 14:31:31 2009 @@ -0,0 +1,40 @@ +/* + * 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 "TransferStackTest.h" + +#include + +using namespace decaf; +using namespace decaf::internal; +using namespace decaf::internal::util; +using namespace decaf::internal::util::concurrent; + +//////////////////////////////////////////////////////////////////////////////// +TransferStackTest::TransferStackTest() { +} + +//////////////////////////////////////////////////////////////////////////////// +TransferStackTest::~TransferStackTest() { +} + +//////////////////////////////////////////////////////////////////////////////// +void TransferStackTest::test() { + + TransferStack stack; + +} Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.h?rev=883703&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.h Tue Nov 24 14:31:31 2009 @@ -0,0 +1,49 @@ +/* + * 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. + */ + +#ifndef _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERSTACKTEST_H_ +#define _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERSTACKTEST_H_ + +#include +#include + +#include +#include + +namespace decaf { +namespace internal { +namespace util { +namespace concurrent { + + class TransferStackTest : public CppUnit::TestFixture { + + CPPUNIT_TEST_SUITE( TransferStackTest ); + CPPUNIT_TEST( test ); + CPPUNIT_TEST_SUITE_END(); + + public: + + TransferStackTest(); + virtual ~TransferStackTest(); + + void test(); + + }; + +}}}} + +#endif /* _DECAF_INTERNAL_UTIL_CONCURRENT_TRANSFERSTACKTEST_H_ */ Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/internal/util/concurrent/TransferStackTest.h ------------------------------------------------------------------------------ svn:eol-style = native