2001-04-26 16:45:43 +00:00
|
|
|
/*
|
|
|
|
SDL - Simple DirectMedia Layer
|
2008-12-08 00:27:32 +00:00
|
|
|
Copyright (C) 1997-2009 Sam Lantinga
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
2006-02-01 06:32:25 +00:00
|
|
|
modify it under the terms of the GNU Lesser General Public
|
2001-04-26 16:45:43 +00:00
|
|
|
License as published by the Free Software Foundation; either
|
2006-02-01 06:32:25 +00:00
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2006-02-01 06:32:25 +00:00
|
|
|
Lesser General Public License for more details.
|
2001-04-26 16:45:43 +00:00
|
|
|
|
2006-02-01 06:32:25 +00:00
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
Sam Lantinga
|
2001-12-14 12:38:15 +00:00
|
|
|
slouken@libsdl.org
|
2001-04-26 16:45:43 +00:00
|
|
|
*/
|
2006-02-21 08:46:50 +00:00
|
|
|
#include "SDL_config.h"
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
#ifndef _SDL_thread_c_h
|
|
|
|
#define _SDL_thread_c_h
|
|
|
|
|
2006-02-16 10:11:48 +00:00
|
|
|
/* Need the definitions of SYS_ThreadHandle */
|
|
|
|
#if SDL_THREADS_DISABLED
|
|
|
|
#include "generic/SDL_systhread_c.h"
|
|
|
|
#elif SDL_THREAD_BEOS
|
|
|
|
#include "beos/SDL_systhread_c.h"
|
|
|
|
#elif SDL_THREAD_EPOC
|
|
|
|
#include "epoc/SDL_systhread_c.h"
|
|
|
|
#elif SDL_THREAD_PTHREAD
|
|
|
|
#include "pthread/SDL_systhread_c.h"
|
|
|
|
#elif SDL_THREAD_SPROC
|
|
|
|
#include "irix/SDL_systhread_c.h"
|
|
|
|
#elif SDL_THREAD_WIN32
|
|
|
|
#include "win32/SDL_systhread_c.h"
|
2008-08-27 15:10:03 +00:00
|
|
|
#elif SDL_THREAD_NDS
|
|
|
|
#include "nds/SDL_systhread_c.h"
|
2006-02-16 10:11:48 +00:00
|
|
|
#else
|
|
|
|
#error Need thread implementation for this platform
|
|
|
|
#include "generic/SDL_systhread_c.h"
|
|
|
|
#endif
|
|
|
|
#include "../SDL_error_c.h"
|
2001-04-26 16:45:43 +00:00
|
|
|
|
|
|
|
/* This is the system-independent thread info structure */
|
2006-07-10 21:04:37 +00:00
|
|
|
struct SDL_Thread
|
|
|
|
{
|
2009-12-16 04:48:11 +00:00
|
|
|
SDL_threadID threadid;
|
2006-07-10 21:04:37 +00:00
|
|
|
SYS_ThreadHandle handle;
|
|
|
|
int status;
|
|
|
|
SDL_error errbuf;
|
|
|
|
void *data;
|
2001-04-26 16:45:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* This is the function called to run a thread */
|
|
|
|
extern void SDL_RunThread(void *data);
|
|
|
|
|
|
|
|
#endif /* _SDL_thread_c_h */
|
2006-07-10 21:04:37 +00:00
|
|
|
/* vi: set ts=4 sw=4 expandtab: */
|