summaryrefslogtreecommitdiff
path: root/yhttpd/src/thrd/thro.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'yhttpd/src/thrd/thro.cpp')
-rw-r--r--yhttpd/src/thrd/thro.cpp43
1 files changed, 43 insertions, 0 deletions
diff --git a/yhttpd/src/thrd/thro.cpp b/yhttpd/src/thrd/thro.cpp
new file mode 100644
index 0000000..8b3f1ba
--- /dev/null
+++ b/yhttpd/src/thrd/thro.cpp
@@ -0,0 +1,43 @@
+#ifndef THRO_CPP
+#define THRO_CPP
+
+#include "thro.h"
+
+using namespace std;
+
+thro::thro()
+{}
+
+thro::~thro()
+{}
+
+void
+thro::run()
+{
+ void *p_void;
+ run( p_void );
+}
+
+void
+thro::run( void *p_void )
+{
+ elem.p_thro = this;
+ elem.p_void = p_void;
+ //wrap::POOL->add_task(start_, &elem);
+ pthread_create( &pthread, NULL, start_, &elem );
+}
+
+void*
+thro::start_( void *p_void )
+{
+ elements *e = (elements*) p_void;
+ e->p_thro->start( e->p_void );
+}
+
+void
+thro::start( void *p_void )
+{
+ wrap::system_message( THRDSTR );
+}
+
+#endif