Rename thread wrapper as rthreads - make it part of the libretro SDK

This commit is contained in:
twinaphex 2014-10-21 03:25:59 +02:00
parent 4f2e52a36f
commit ca79265e4b
17 changed files with 53 additions and 41 deletions

View File

@ -292,7 +292,7 @@ ifeq ($(HAVE_FREETYPE), 1)
endif
ifeq ($(HAVE_THREADS), 1)
OBJ += autosave.o thread.o gfx/video_thread_wrapper.o audio/audio_thread_wrapper.o
OBJ += autosave.o rthreads/rthreads.o gfx/video_thread_wrapper.o audio/audio_thread_wrapper.o
DEFINES += -DHAVE_THREADS
ifeq ($(findstring Haiku,$(OS)),)
LIBS += -lpthread

View File

@ -19,7 +19,7 @@
#include <stdlib.h>
#include <alsa/asoundlib.h>
#include "../general.h"
#include "../thread.h"
#include "../rthreads/rthreads.h"
#include "../fifo_buffer.h"
#define TRY_ALSA(x) if (x < 0) { \

View File

@ -14,7 +14,7 @@
*/
#include "audio_thread_wrapper.h"
#include "../thread.h"
#include "../rthreads/rthreads.h"
#include "../general.h"
#include "../performance.h"
#include "../fifo_buffer.h"

View File

@ -16,7 +16,7 @@
#include "../driver.h"
#include "../general.h"
#include "../thread.h"
#include "../rthreads/rthreads.h"
#include <SLES/OpenSLES.h>
#ifdef ANDROID

View File

@ -19,7 +19,7 @@
#include "rsound.h"
#include "../fifo_buffer.h"
#include "../boolean.h"
#include "../thread.h"
#include "../rthreads/rthreads.h"
typedef struct rsd
{

View File

@ -25,9 +25,9 @@ extern "C" {
#include <sys/types.h>
#include <unistd.h>
#ifdef STANDALONE
#include "thread.h"
#include "rthreads.h"
#else
#include "../thread.h"
#include "../rthreads/rthreads.h"
#endif
#include <sys/time.h>
#include <time.h>

View File

@ -23,7 +23,7 @@
#include "SDL.h"
#include "SDL_audio.h"
#include "../thread.h"
#include "../rthreads/rthreads.h"
#include "../general.h"
#include "../fifo_buffer.h"

View File

@ -14,7 +14,7 @@
*/
#include "autosave.h"
#include "thread.h"
#include "rthreads/rthreads.h"
#include <stdlib.h>
#include "boolean.h"
#include <string.h>

View File

@ -32,7 +32,7 @@ struct rarch_soft_plug
};
#ifdef HAVE_THREADS
#include "../thread.h"
#include "../rthreads/rthreads.h"
struct filter_thread_data
{

View File

@ -18,7 +18,7 @@
#include "../driver.h"
#include "../boolean.h"
#include "../thread.h"
#include "../rthreads/rthreads.h"
#include "../general.h"
/* Starts a video driver in a new thread.

View File

@ -616,7 +616,7 @@ THREAD
#if defined(HAVE_THREADS) && defined(XENON)
#include "../thread/xenon_sdl_threads.c"
#elif defined(HAVE_THREADS)
#include "../thread.c"
#include "../rthreads/rthreads.c"
#include "../gfx/video_thread_wrapper.c"
#include "../audio/audio_thread_wrapper.c"
#include "../autosave.c"

View File

@ -44,7 +44,7 @@ extern "C" {
#include <stdlib.h>
#include "../boolean.h"
#include "../fifo_buffer.h"
#include "../thread.h"
#include "../rthreads/rthreads.h"
#include "../general.h"
#include "../gfx/scaler/scaler.h"
#include "../conf/config_file.h"

View File

@ -1,20 +1,26 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2014 - Daniel De Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
/* Copyright (C) 2010-2014 The RetroArch team
*
* RetroArch 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 General Public License for more details.
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (rthreads.c).
* ---------------------------------------------------------------------------------------
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
* Permission is hereby granted, free of charge,
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "thread.h"
#include "rthreads.h"
#include <stdlib.h>
#if defined(_WIN32)
@ -25,9 +31,9 @@
#include <windows.h>
#endif
#elif defined(GEKKO)
#include "thread/gx_pthread.h"
#include "gx_pthread.h"
#elif defined(PSP)
#include "thread/psp_pthread.h"
#include "psp_pthread.h"
#else
#include <pthread.h>
#include <time.h>

View File

@ -1,17 +1,23 @@
/* RetroArch - A frontend for libretro.
* Copyright (C) 2010-2014 - Hans-Kristian Arntzen
* Copyright (C) 2011-2014 - Daniel de Matteis
*
* RetroArch is free software: you can redistribute it and/or modify it under the terms
* of the GNU General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
/* Copyright (C) 2010-2014 The RetroArch team
*
* RetroArch 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 General Public License for more details.
* ---------------------------------------------------------------------------------------
* The following license statement only applies to this file (rthreads.h).
* ---------------------------------------------------------------------------------------
*
* You should have received a copy of the GNU General Public License along with RetroArch.
* If not, see <http://www.gnu.org/licenses/>.
* Permission is hereby granted, free of charge,
* to any person obtaining a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
* and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#ifndef THREAD_H__
@ -24,7 +30,7 @@
extern "C" {
#endif
/* Implements the bare minimum needed for RetroArch. */
/* Implements the bare minimum needed. */
typedef struct sthread sthread_t;