Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
vsnet_thread_sdl.cpp
Go to the documentation of this file.
1 #include <config.h>
2 
3 #if defined (USE_NET_THREAD_SDL)
4 #include "vsnet_thread.h"
5 
6 #error This thread library should not be in use right now. Bitrot !
7 
8 //#include <iostream>
9 //using namespace std;
10 //
11 //#include "vsnet_debug.h"
12 //#include "jthread.h"
13 //#include "jmutex.h"
14 //#include "jcond.h"
15 //
17 //* definition of VSThread *
18 //*------------------------------------------------------------*/
19 //
20 //void VSThread::init( )
21 //{
22 //}
23 //
24 //struct VSThread::Private : public JThread
25 //{
26 //VSThread* _t;
27 //public:
28 //Private( VSThread* t ) : _t(t) { }
29 //
30 //virtual void* Thread( ) {
31 //_t->run( );
32 //return NULL;
33 //}
34 //};
35 //
36 //VSThread::VSThread( bool /*detached*/ )
37 //{
38 //_internal = new Private( this );
39 //}
40 //
41 //VSThread::~VSThread( )
42 //{
43 //delete _internal;
44 //}
45 //
46 //void VSThread::start( )
47 //{
48 //_internal->Start( );
49 //}
50 //
51 //void VSThread::join( )
52 //{
53 //}
54 //
56 //* definition of VSMutex *
57 //*------------------------------------------------------------*/
58 //
59 //struct VSMutex::Private : public JMutex
60 //{
61 //};
62 //
63 //VSMutex::VSMutex( )
64 //{
65 //_internal = new Private;
66 //_internal->Init( );
67 //}
68 //
69 //VSMutex::~VSMutex( )
70 //{
71 //delete _internal;
72 //}
73 //
74 //void VSMutex::lock( )
75 //{
76 //if( _internal->Lock( ) != 0 )
77 //{
78 //cerr << "Can't lock JMutex" << endl;
79 //}
80 //}
81 //
82 //void VSMutex::unlock( )
83 //{
84 //if( _internal->Unlock( ) != 0 )
85 //{
86 //cerr << "Can't unlock JMutex" << endl;
87 //}
88 //}
89 //
91 //* definition of VSCond *
92 //*------------------------------------------------------------*/
93 //
94 //struct VSCond::Private : public JCond
95 //{
96 //};
97 //
98 //VSCond::VSCond( )
99 //{
100 //_internal = new Private;
101 //_internal->Init( );
102 //}
103 //
104 //VSCond::~VSCond( )
105 //{
106 //delete _internal;
107 //}
108 //
109 //void VSCond::wait( VSMutex& mx )
110 //{
111 //if( _internal->Wait( *mx._internal ) != 0 )
112 //{
113 //cerr << "Can't wait for JCond condition variable" << endl;
114 //}
115 //}
116 //
117 //void VSCond::signal( )
118 //{
119 //if( _internal->Signal( ) != 0 )
120 //{
121 //cerr << "Can't signal JCond condition variable" << endl;
122 //}
123 //}
124 //
125 //void VSCond::broadcast( )
126 //{
127 //if( _internal->Broadcast( ) != 0 )
128 //{
129 //cerr << "Can't broadcast to JCond condition variable" << endl;
130 //}
131 //}
132 
133 #endif /* defined(USE_NET_THREAD_SDL) */
134