TLIB documentation
 

tlThread.h

Go to the documentation of this file.
00001 /////////////////////////////////////////////////////////////////////////////////
00002 //
00003 //  This file is part of the TLIB computer vision library.
00004 //  Copyright (C) 2003-2008 Sebastien Grange
00005 //  Copyright (C) 2003-2007 VRAI Group, EPFL
00006 //  All rights reserved.
00007 // 
00008 //  This library is free software; you can redistribute it and/or modify
00009 //  it under the terms of the GNU General Public License("GPL") version 2
00010 //  as published by the Free Software Foundation.
00011 // 
00012 //  <http://www.tuyphon.com/tlib>
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     /* max # of threads */
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 // sleep (suspend current thread for a period)
00041 void tlThreadSleep         (unsigned int msec);
00042 
00043 #endif


TLIB documentation - generated on 7 May 2008
Please address any questions to seb@tuyphon.com
(C) 2001-2008 - S. Grange
(C) 2001-2007 - VRAI Group, EPFL
All Rights Reserved.