1 /* Thread compatibility glue 2 * Copyright (C) 2009 Howard Chu 3 * 4 * This Program is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU General Public License as published by 6 * the Free Software Foundation; either version 2, or (at your option) 7 * any later version. 8 * 9 * This Program is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 * GNU General Public License for more details. 13 * 14 * You should have received a copy of the GNU General Public License 15 * along with RTMPDump; see the file COPYING. If not, write to 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 * http://www.gnu.org/copyleft/gpl.html 19 * 20 */ 21 22 #ifndef __THREAD_H__ 23 #define __THREAD_H__ 1 24 25 #ifdef WIN32 26 #include <windows.h> 27 #include <process.h> 28 #define TFTYPE void 29 #define TFRET() 30 #define THANDLE HANDLE 31 #else 32 #include <pthread.h> 33 #define TFTYPE void * 34 #define TFRET() return 0 35 #define THANDLE pthread_t 36 #endif 37 typedef TFTYPE (thrfunc)(void *arg); 38 39 THANDLE ThreadCreate(thrfunc *routine, void *args); 40 #endif /* __THREAD_H__ */ 41