diff options
author | tron <tron@openttd.org> | 2005-08-05 09:15:41 +0000 |
---|---|---|
committer | tron <tron@openttd.org> | 2005-08-05 09:15:41 +0000 |
commit | 4696ef802a1c3b037a07a841945d73b52720a163 (patch) | |
tree | 4db884818a15ec2dc30fe1f1e660bded27872dae /thread.h | |
parent | 4f9b0d5f294a86cc3f041b3acaf1b1623afb277e (diff) | |
download | openttd-4696ef802a1c3b037a07a841945d73b52720a163.tar.xz |
(svn r2809) Implement more generic threading functions, which allow more than one thread
Diffstat (limited to 'thread.h')
-rw-r--r-- | thread.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/thread.h b/thread.h new file mode 100644 index 000000000..1f4878106 --- /dev/null +++ b/thread.h @@ -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 |