Commit e884bb69 authored by Libretro-Admin's avatar Libretro-Admin
Browse files

No longer needs threads

parent 94852116
......@@ -17,8 +17,8 @@ MFLAGS :=
ASFLAGS :=
LDFLAGS :=
INCFLAGS :=
LIBS :=
CFLAGS :=
LIBS :=
CFLAGS :=
CXXFLAGS :=
CC_AS ?= $(AS)
......@@ -462,6 +462,8 @@ ifeq ($(NO_THREADS),1)
RZDCY_CFLAGS += -DTARGET_NO_THREADS
CFLAGS += -DTARGET_NO_THREADS
CXXFLAGS += -DTARGET_NO_THREADS
else
LIBS += -lpthread
endif
ifeq ($(NO_REC),1)
......@@ -491,7 +493,7 @@ RZDCY_CXXFLAGS := $(RZDCY_CFLAGS) -fexceptions -fno-rtti -std=gnu++11
CFLAGS += $(OPTFLAGS) -D RELEASE -c
CFLAGS += -fno-strict-aliasing -ffast-math
CXXFLAGS += -fno-rtti -fpermissive -fno-operator-names
LIBS += -lm -lpthread
LIBS += -lm
PREFIX ?= /usr/local
......
......@@ -158,8 +158,12 @@ endif
SOURCES_CXX += $(CORE_DIR)/libretro/libretro.cpp \
$(CORE_DIR)/libretro/common.cpp
SOURCES_C += $(LIBRETRO_COMM_DIR)/memmap/memalign.c \
$(LIBRETRO_COMM_DIR)/rthreads/rthreads.c
SOURCES_C += $(LIBRETRO_COMM_DIR)/memmap/memalign.c
ifeq ($(NO_THREADS),1)
else
SOURCES_C += $(LIBRETRO_COMM_DIR)/rthreads/rthreads.c
endif
SOURCES_C += $(DEPS_DIR)/zlib/deflate.c \
$(DEPS_DIR)/zlib/gzlib.c \
......
......@@ -18,10 +18,10 @@ rend_context vd_rc;
#if !defined(TARGET_NO_THREADS)
slock_t *mtx_rqueue;
slock_t *mtx_pool;
cResetEvent frame_finished(false, true);
#endif
TA_context* rqueue;
cResetEvent frame_finished(false, true);
double last_frame = 0;
u64 last_cyces = 0;
......@@ -155,8 +155,8 @@ bool QueueRender(TA_context* ctx)
return false;
}
frame_finished.Reset();
#ifndef TARGET_NO_THREADS
frame_finished.Reset();
slock_lock(mtx_rqueue);
#endif
TA_context* old = rqueue;
......@@ -211,7 +211,9 @@ void FinishRender(TA_context* ctx)
#endif
tactx_Recycle(ctx);
#ifndef TARGET_NO_THREADS
frame_finished.Set();
#endif
}
......
#pragma once
#include "ta.h"
#include "pvr_regs.h"
#ifndef TARGET_NO_THREADS
#include <rthreads/rthreads.h>
#endif
//Vertex storage types
struct Vertex
......
......@@ -844,6 +844,7 @@ void os_DebugBreak(void)
exit(-1);
}
#ifndef TARGET_NO_THREADS
cResetEvent::cResetEvent(bool State,bool Auto)
{
//sem_init((sem_t*)hEvent, 0, State?1:0);
......@@ -883,3 +884,4 @@ void cResetEvent::Wait()//Wait for signal , then reset
state=false;
slock_unlock(mutx);
}
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment