Split off Routine into its own file.

BUG=15907357

Change-Id: I7a16ab35e8013d8457c482b06220b755a9f79745
Reviewed-on: https://swiftshader-review.googlesource.com/1144
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/src/Reactor/Routine.hpp b/src/Reactor/Routine.hpp
new file mode 100644
index 0000000..6cdc6bc
--- /dev/null
+++ b/src/Reactor/Routine.hpp
@@ -0,0 +1,41 @@
+#ifndef sw_Routine_hpp

+#define sw_Routine_hpp

+

+namespace sw

+{

+	class RoutineManager;

+

+	class Routine

+	{

+		friend class RoutineManager;

+

+	public:

+		Routine(int bufferSize);

+		Routine(void *memory, int bufferSize, int offset);

+

+		~Routine();

+

+		void setFunctionSize(int functionSize);

+

+		const void *getBuffer();

+		const void *getEntry();

+		int getBufferSize();

+		int getFunctionSize();   // Includes constants before the entry point

+		int getCodeSize();       // Executable code only

+		bool isDynamic();

+

+		void bind();

+		void unbind();

+

+	private:

+		void *buffer;

+		const void *entry;

+		int bufferSize;

+		int functionSize;

+

+		volatile int bindCount;

+		const bool dynamic;   // Generated or precompiled

+	};

+}

+

+#endif   // sw_Routine_hpp