00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __TLTHREAD_H__
00018 #define __TLTHREAD_H__
00019
00020 #include "tlVision.h"
00021
00022 #ifdef WIN32
00023 #include <windows.h>
00024 #define tlThreadHandle HANDLE
00025 #endif
00026
00027 #ifdef LINUX
00028 #define tlThreadHandle pthread_t
00029 #define TLTHREAD_MAX 100
00030 #endif
00031
00032 typedef void (*TLTHREAD_FUNC_PTR)(void);
00033
00034 int tlThreadCreate (TLTHREAD_FUNC_PTR func, tlThreadHandle *handle);
00035 void tlThreadExit (int returnCode);
00036 int tlThreadKill (tlThreadHandle *handle);
00037 int tlThreadChangePriority (tlThreadHandle *handle, int priority);
00038 int tlThreadJoin (tlThreadHandle *handle, int *returnCode, int timeout);
00039
00040
00041 void tlThreadSleep (unsigned int msec);
00042
00043 #endif