2005-08-05 11:15:41 +02:00
|
|
|
/* $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;
|
|
|
|
|
2005-08-05 13:53:48 +02:00
|
|
|
typedef void* (*ThreadFunc)(void*);
|
2005-08-05 11:15:41 +02:00
|
|
|
|
|
|
|
Thread* OTTDCreateThread(ThreadFunc, void*);
|
2005-08-05 13:53:48 +02:00
|
|
|
void* OTTDJoinThread(Thread*);
|
2005-08-05 11:15:41 +02:00
|
|
|
|
|
|
|
#endif
|