(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.

This commit is contained in:
Darkvater
2005-09-02 16:05:59 +00:00
parent ae356b641d
commit a181446829
8 changed files with 69 additions and 24 deletions

View File

@@ -3,12 +3,6 @@
#ifndef THREAD_H
#define THREAD_H
/*
* DO NOT USE THREADS if you don't know what race conditions, mutexes,
* semaphores, atomic operations, etc. are or how to properly handle them.
* Ask somebody who has a clue.
*/
typedef struct Thread Thread;
typedef void* (*ThreadFunc)(void*);
@@ -16,4 +10,4 @@ typedef void* (*ThreadFunc)(void*);
Thread* OTTDCreateThread(ThreadFunc, void*);
void* OTTDJoinThread(Thread*);
#endif
#endif /* THREAD_H */