Initial commit to the PapyrusRT repository.

This is the initial commit as submitted to CQ 9646.

The repository contains two top-level folders:

- codegen: the code-generator
- rts: the run-time system

Also-by: Andrew Eidsness, Zeligsoft contractor, andrewe@jfront.com,
Barry Maher, Zeligsoft contractor, bmaher@gpinc.ca, Ernesto Posse,
Zeligsoft, eposse@zeligsoft.com, Tim McGuire, Zeligsoft,
tmcguire@zeligsoft.com, Young-Soo Roh, Zeligsoft, ysroh@zeligsoft.com,
Toby McClean, Zeligsoft, toby@zeligsoft.com, Charles Rivet, Zeligsoft,
charles@zeligsoft.com, Andreas Henriksson, Ericsson,
andreas.henriksson@ericsson.com, Akos Horvath, IncQuery Labs,
akos.horvath@incquerylabs.com, Gabor Batori, Ericsson,
Gabor.Batori@ericsson.com, Abel Hegedus, IncQuery Labs,
abel.hegedus@incquerylabs.com, Denes Harmath, IncQuery Labs,
harmathdenes@gmail.com
Signed-off-by: Ernesto Posse <eposse@gmail.com>
diff --git a/rts/umlrt/umlrtpool.cc b/rts/umlrt/umlrtpool.cc
new file mode 100644
index 0000000..2fd996f
--- /dev/null
+++ b/rts/umlrt/umlrtpool.cc
@@ -0,0 +1,55 @@
+// umlrtpool.cc
+
+/*******************************************************************************
+ * Copyright (c) 2014-2015 Zeligsoft (2009) Limited  and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+#include <stdlib.h>
+#include "basefatal.hh"
+#include "basedebug.hh"
+#include "umlrtguard.hh"
+#include "umlrtpool.hh"
+#include "umlrtqueueelement.hh"
+#include "umlrtuserconfig.hh"
+
+// See umlrtqueue.hh for documentation.
+
+// Create an empty queue.
+UMLRTPool::UMLRTPool(size_t incrementSize) :
+        head(0), increment(incrementSize), qid(0)
+{
+}
+
+UMLRTPool::~UMLRTPool()
+{
+}
+
+// Remove the first element on the pool.
+// Grow the list if it is empty
+const UMLRTQueueElement * UMLRTPool::get()
+{
+    UMLRTGuard g(mutex);
+
+    if (head == NULL)
+    {
+        grow();
+    }
+    const UMLRTQueueElement * element = head;
+    head = element->next;
+    return element;
+}
+
+// Add element back to pool (at front).
+void UMLRTPool::put(const UMLRTQueueElement * element)
+{
+    UMLRTGuard g(mutex);
+    if (element)
+    {
+        element->next = head;
+        head = element;
+    }
+}