forked from mirror/OpenTTD
(svn r2809) Implement more generic threading functions, which allow more than one thread
This commit is contained in:
19
thread.h
Normal file
19
thread.h
Normal 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
|
Reference in New Issue
Block a user