diff --git a/Makefile.common b/Makefile.common index fa11b958df..3e875e2196 100644 --- a/Makefile.common +++ b/Makefile.common @@ -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 diff --git a/audio/alsathread.c b/audio/alsathread.c index a0a92c4507..75dbe5284f 100644 --- a/audio/alsathread.c +++ b/audio/alsathread.c @@ -19,7 +19,7 @@ #include #include #include "../general.h" -#include "../thread.h" +#include "../rthreads/rthreads.h" #include "../fifo_buffer.h" #define TRY_ALSA(x) if (x < 0) { \ diff --git a/audio/audio_thread_wrapper.c b/audio/audio_thread_wrapper.c index 9468fea639..d8efa3c825 100644 --- a/audio/audio_thread_wrapper.c +++ b/audio/audio_thread_wrapper.c @@ -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" diff --git a/audio/opensl.c b/audio/opensl.c index 3ca86f28d7..984d79e1ca 100644 --- a/audio/opensl.c +++ b/audio/opensl.c @@ -16,7 +16,7 @@ #include "../driver.h" #include "../general.h" -#include "../thread.h" +#include "../rthreads/rthreads.h" #include #ifdef ANDROID diff --git a/audio/rsound.c b/audio/rsound.c index 9a7989842e..4135aab0cf 100644 --- a/audio/rsound.c +++ b/audio/rsound.c @@ -19,7 +19,7 @@ #include "rsound.h" #include "../fifo_buffer.h" #include "../boolean.h" -#include "../thread.h" +#include "../rthreads/rthreads.h" typedef struct rsd { diff --git a/audio/rsound.h b/audio/rsound.h index d393c4568f..abed2790ed 100644 --- a/audio/rsound.h +++ b/audio/rsound.h @@ -25,9 +25,9 @@ extern "C" { #include #include #ifdef STANDALONE -#include "thread.h" +#include "rthreads.h" #else -#include "../thread.h" +#include "../rthreads/rthreads.h" #endif #include #include diff --git a/audio/sdl_audio.c b/audio/sdl_audio.c index 736f98bd14..3371e2ba90 100644 --- a/audio/sdl_audio.c +++ b/audio/sdl_audio.c @@ -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" diff --git a/autosave.c b/autosave.c index d760797876..4854c8ddec 100644 --- a/autosave.c +++ b/autosave.c @@ -14,7 +14,7 @@ */ #include "autosave.h" -#include "thread.h" +#include "rthreads/rthreads.h" #include #include "boolean.h" #include diff --git a/gfx/filter.c b/gfx/filter.c index 96e949784e..0bc9db14b4 100644 --- a/gfx/filter.c +++ b/gfx/filter.c @@ -32,7 +32,7 @@ struct rarch_soft_plug }; #ifdef HAVE_THREADS -#include "../thread.h" +#include "../rthreads/rthreads.h" struct filter_thread_data { diff --git a/gfx/video_thread_wrapper.h b/gfx/video_thread_wrapper.h index 8447881123..bcaf750981 100644 --- a/gfx/video_thread_wrapper.h +++ b/gfx/video_thread_wrapper.h @@ -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. diff --git a/griffin/griffin.c b/griffin/griffin.c index 14fb897f86..ce002c68ce 100644 --- a/griffin/griffin.c +++ b/griffin/griffin.c @@ -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" diff --git a/record/ffmpeg.c b/record/ffmpeg.c index 7c8a83f0fe..4cabfc2cac 100644 --- a/record/ffmpeg.c +++ b/record/ffmpeg.c @@ -44,7 +44,7 @@ extern "C" { #include #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" diff --git a/thread/gx_pthread.h b/rthreads/gx_pthread.h similarity index 100% rename from thread/gx_pthread.h rename to rthreads/gx_pthread.h diff --git a/thread/psp_pthread.h b/rthreads/psp_pthread.h similarity index 100% rename from thread/psp_pthread.h rename to rthreads/psp_pthread.h diff --git a/thread.c b/rthreads/rthreads.c similarity index 81% rename from thread.c rename to rthreads/rthreads.c index 3791f5d92f..a1a3f63805 100644 --- a/thread.c +++ b/rthreads/rthreads.c @@ -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 . + * 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 #if defined(_WIN32) @@ -25,9 +31,9 @@ #include #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 #include diff --git a/thread.h b/rthreads/rthreads.h similarity index 56% rename from thread.h rename to rthreads/rthreads.h index 2607ad3503..edf2756886 100644 --- a/thread.h +++ b/rthreads/rthreads.h @@ -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 . + * 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; diff --git a/thread/xenon_sdl_threads.c b/rthreads/xenon_sdl_threads.c similarity index 100% rename from thread/xenon_sdl_threads.c rename to rthreads/xenon_sdl_threads.c