| author | egladil | 
| Sat, 29 Dec 2007 05:15:13 +0000 | |
| changeset 8652 | e06732646b8a | 
| parent 7814 | fe643468ad64 | 
| child 10175 | 1119f6640ee6 | 
| permissions | -rw-r--r-- | 
| 
2285
 
3193cbd1ba88
(svn r2809) Implement more generic threading functions, which allow more than one thread
 
tron 
parents:  
diff
changeset
 | 
1  | 
/* $Id$ */  | 
| 
 
3193cbd1ba88
(svn r2809) Implement more generic threading functions, which allow more than one thread
 
tron 
parents:  
diff
changeset
 | 
2  | 
|
| 
6918
 
5589c415e28f
(svn r9558) -Documentation: doxygen and comment changes: 'T' now.  Almost done
 
belugas 
parents: 
6574 
diff
changeset
 | 
3  | 
/** @file thread.h */  | 
| 
 
5589c415e28f
(svn r9558) -Documentation: doxygen and comment changes: 'T' now.  Almost done
 
belugas 
parents: 
6574 
diff
changeset
 | 
4  | 
|
| 
2285
 
3193cbd1ba88
(svn r2809) Implement more generic threading functions, which allow more than one thread
 
tron 
parents:  
diff
changeset
 | 
5  | 
#ifndef THREAD_H  | 
| 
 
3193cbd1ba88
(svn r2809) Implement more generic threading functions, which allow more than one thread
 
tron 
parents:  
diff
changeset
 | 
6  | 
#define THREAD_H  | 
| 
 
3193cbd1ba88
(svn r2809) Implement more generic threading functions, which allow more than one thread
 
tron 
parents:  
diff
changeset
 | 
7  | 
|
| 
6574
 
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
 
rubidium 
parents: 
6573 
diff
changeset
 | 
8  | 
struct OTTDThread;  | 
| 
2285
 
3193cbd1ba88
(svn r2809) Implement more generic threading functions, which allow more than one thread
 
tron 
parents:  
diff
changeset
 | 
9  | 
|
| 
7814
 
fe643468ad64
(svn r10673) -Cleanup: some assorted style cleanups. Primarily type* var -> type *var.
 
rubidium 
parents: 
6918 
diff
changeset
 | 
10  | 
typedef void * (*OTTDThreadFunc)(void*);  | 
| 
2285
 
3193cbd1ba88
(svn r2809) Implement more generic threading functions, which allow more than one thread
 
tron 
parents:  
diff
changeset
 | 
11  | 
|
| 
7814
 
fe643468ad64
(svn r10673) -Cleanup: some assorted style cleanups. Primarily type* var -> type *var.
 
rubidium 
parents: 
6918 
diff
changeset
 | 
12  | 
OTTDThread *OTTDCreateThread(OTTDThreadFunc, void*);  | 
| 
 
fe643468ad64
(svn r10673) -Cleanup: some assorted style cleanups. Primarily type* var -> type *var.
 
rubidium 
parents: 
6918 
diff
changeset
 | 
13  | 
void *OTTDJoinThread(OTTDThread*);  | 
| 6573 | 14  | 
void OTTDExitThread();  | 
| 
2285
 
3193cbd1ba88
(svn r2809) Implement more generic threading functions, which allow more than one thread
 
tron 
parents:  
diff
changeset
 | 
15  | 
|
| 
2380
 
3b26659b4a9a
(svn r2906) Fix some threaded saving problems. Now the thread only interfaces with the main program through a sort of mutex. Communication uses the function OTTD_SendThreadMessage() with the approiate message which is handled in ProcessSentMessage() during the main loop.
 
Darkvater 
parents: 
2286 
diff
changeset
 | 
16  | 
#endif /* THREAD_H */  |