(svn r2809) Implement more generic threading functions, which allow more than one thread

This commit is contained in:
tron
2005-08-05 09:15:41 +00:00
parent 4f9b0d5f29
commit 4696ef802a
11 changed files with 202 additions and 111 deletions

19
thread.h Normal file
View File

@@ -0,0 +1,19 @@
/* $Id$ */
#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*);
Thread* OTTDCreateThread(ThreadFunc, void*);
void OTTDJoinThread(Thread*);
#endif