1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-25 12:12:50 +01:00

Fix conflicts.

This commit is contained in:
Sacha 2014-07-12 17:02:39 +10:00
parent c09b0f511e
commit 9816ec3aa0
35 changed files with 99 additions and 103 deletions

View File

@ -1,20 +1,23 @@
#include <time.h>
#include <sys/time.h>
#include "GNU.h"
#ifdef __APPLE__
void * _aligned_malloc(size_t size, size_t alignment) {
void *buffer;
posix_memalign(&buffer, alignment, size);
return buffer;
}
#include <time.h>
#include <sys/time.h>
int clock_gettime(int foo, struct timespec *ts) {
struct timeval tv;
struct timeval tv;
gettimeofday(&tv, NULL);
ts->tv_sec = tv.tv_sec;
ts->tv_nsec = tv.tv_usec * 1000;
return(0);
gettimeofday(&tv, NULL);
ts->tv_sec = tv.tv_sec;
ts->tv_nsec = tv.tv_usec * 1000;
return(0);
}
#endif /* !__APPLE__ */
#endif /* __APPLE__ */
#if defined(__GNUG__)
void * _aligned_malloc(size_t size, size_t alignment) {
void *buffer;
return (posix_memalign(&buffer, alignment, size) == 0) ? buffer : 0;
}
#endif

View File

@ -28,7 +28,6 @@ void strcpy_trunc(char (&dst)[size], const std::string& src)
#define _byteswap_ushort(x) __builtin_bswap16(x)
#define _byteswap_ulong(x) __builtin_bswap32(x)
#define _byteswap_uint64(x) __builtin_bswap64(x)
#define Sleep(x) usleep(x * 1000)
#define mkdir(x) mkdir(x, 0777)
#define INFINITE 0xFFFFFFFF
#define _CRT_ALIGN(x) __attribute__((aligned(x)))
@ -61,10 +60,10 @@ inline int64_t __mulh(int64_t a, int64_t b)
return result;
}
#ifndef __APPLE__
#define _aligned_malloc(size,alignment) memalign(alignment,size)
#else
void * _aligned_malloc(size_t size, size_t alignment);
#ifdef __APPLE__
int clock_gettime(int foo, struct timespec *ts);
#define wxIsNaN(x) ((x) != (x))
@ -72,7 +71,7 @@ int clock_gettime(int foo, struct timespec *ts);
#define CLOCK_MONOTONIC 0
#endif /* !CLOCK_MONOTONIC */
#endif /* !__APPLE__ */
#endif /* __APPLE__ */
#define _aligned_free free

View File

@ -14,7 +14,7 @@ __forceinline void SM_Sleep()
}
else
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
}

View File

@ -177,7 +177,7 @@ private:
Step();
}
while(!TestDestroy()) Sleep(0);
while(!TestDestroy()) std::this_thread::sleep_for(std::chrono::milliseconds(0));
if(m_destroy_sem.TryWait() != wxSEMA_NO_ERROR) m_destroy_sem.Post();
}
@ -198,7 +198,7 @@ public:
{
if(!IsRunning()) return;
while(m_main_sem.TryWait() != wxSEMA_NO_ERROR) Sleep(0);
while(m_main_sem.TryWait() != wxSEMA_NO_ERROR) std::this_thread::sleep_for(std::chrono::milliseconds(0));
}
void Exit(bool wait = false)

View File

@ -3,6 +3,7 @@
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/DbgCommand.h"
#include "rpcs3/Ini.h"
#include "CPUThread.h"
@ -333,7 +334,7 @@ void CPUThread::Task()
if (status == CPUThread_Sleeping)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}
@ -368,7 +369,7 @@ s64 CPUThread::ExecAsCallback(u64 pc, bool wait, u64 a1, u64 a2, u64 a3, u64 a4)
LOG_WARNING(PPU, "ExecAsCallback() aborted");
return CELL_ECANCELED; // doesn't mean anything
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
Stop();
@ -394,7 +395,7 @@ s64 CPUThread::ExecAsCallback(u64 pc, bool wait, u64 a1, u64 a2, u64 a3, u64 a4)
LOG_WARNING(PPU, "ExecAsCallback(wait=%s) aborted", wait ? "true" : "false");
return CELL_EABORT; // doesn't mean anything
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
return wait * m_exit_status;

View File

@ -153,7 +153,7 @@ public:
{
while(func(ThreadStatus()))
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
}

View File

@ -2,6 +2,7 @@
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/DbgCommand.h"
#include "CPUThreadManager.h"
#include "Emu/Cell/PPUThread.h"

View File

@ -105,7 +105,8 @@ bool RawSPUThread::Read32(const u64 addr, u32* value)
case SPU_In_MBox_offs:
{
LOG_ERROR(Log::SPU, "RawSPUThread[%d]: Read32(SPU_In_MBox)", m_index);
while (!SPU.In_MBox.Pop(*value) && !Emu.IsStopped()) Sleep(1);
while (!SPU.In_MBox.Pop(*value) && !Emu.IsStopped())
std::this_thread::sleep_for(std::chrono::milliseconds(1));
break;
}
@ -250,7 +251,8 @@ bool RawSPUThread::Write32(const u64 addr, const u32 value)
case SPU_Out_MBox_offs:
{
LOG_WARNING(Log::SPU, "RawSPUThread[%d]: Write32(SPU_Out_MBox, 0x%x)", m_index, value);
while (!SPU.Out_MBox.Push(value) && !Emu.IsStopped()) Sleep(1);
while (!SPU.Out_MBox.Push(value) && !Emu.IsStopped())
std::this_thread::sleep_for(std::chrono::milliseconds(1));
break;
}

View File

@ -1,11 +1,9 @@
#include "stdafx.h"
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/SysCalls/lv2/sys_lwmutex.h"
#include "Emu/SysCalls/lv2/sys_event.h"
#include "Emu/Cell/SPUThread.h"
#include "Emu/Cell/SPUDecoder.h"
#include "Emu/Cell/SPUInterpreter.h"

View File

@ -977,7 +977,7 @@ public:
{
while (t->IsAlive())
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (Emu.IsStopped())
{
LOG_WARNING(Log::SPU, "%s(%s) aborted", __FUNCTION__, spu_ch_name[ch]);
@ -1108,7 +1108,7 @@ public:
case SPU_WrOutMbox:
{
//ConLog.Warning("%s: %s = 0x%x", __FUNCTION__, spu_ch_name[ch], v);
while (!SPU.Out_MBox.Push(v) && !Emu.IsStopped()) Sleep(1);
while (!SPU.Out_MBox.Push(v) && !Emu.IsStopped()) std::this_thread::sleep_for(std::chrono::milliseconds(1));
break;
}
@ -1208,41 +1208,41 @@ public:
{
case SPU_RdInMbox:
{
while (!SPU.In_MBox.Pop(v) && !Emu.IsStopped()) Sleep(1);
while (!SPU.In_MBox.Pop(v) && !Emu.IsStopped()) std::this_thread::sleep_for(std::chrono::milliseconds(1));
//ConLog.Warning("%s: 0x%x = %s", __FUNCTION__, v, spu_ch_name[ch]);
break;
}
case MFC_RdTagStat:
{
while (!Prxy.TagStatus.Pop(v) && !Emu.IsStopped()) Sleep(1);
while (!Prxy.TagStatus.Pop(v) && !Emu.IsStopped()) std::this_thread::sleep_for(std::chrono::milliseconds(1));
//ConLog.Warning("%s: 0x%x = %s", __FUNCTION__, v, spu_ch_name[ch]);
break;
}
case SPU_RdSigNotify1:
{
while (!SPU.SNR[0].Pop(v) && !Emu.IsStopped()) Sleep(1);
while (!SPU.SNR[0].Pop(v) && !Emu.IsStopped()) std::this_thread::sleep_for(std::chrono::milliseconds(1));
//ConLog.Warning("%s: 0x%x = %s", __FUNCTION__, v, spu_ch_name[ch]);
break;
}
case SPU_RdSigNotify2:
{
while (!SPU.SNR[1].Pop(v) && !Emu.IsStopped()) Sleep(1);
while (!SPU.SNR[1].Pop(v) && !Emu.IsStopped()) std::this_thread::sleep_for(std::chrono::milliseconds(1));
//ConLog.Warning("%s: 0x%x = %s", __FUNCTION__, v, spu_ch_name[ch]);
break;
}
case MFC_RdAtomicStat:
{
while (!Prxy.AtomicStat.Pop(v) && !Emu.IsStopped()) Sleep(1);
while (!Prxy.AtomicStat.Pop(v) && !Emu.IsStopped()) std::this_thread::sleep_for(std::chrono::milliseconds(1));
break;
}
case MFC_RdListStallStat:
{
while (!StallStat.Pop(v) && !Emu.IsStopped()) Sleep(1);
while (!StallStat.Pop(v) && !Emu.IsStopped()) std::this_thread::sleep_for(std::chrono::milliseconds(1));
break;
}
@ -1336,7 +1336,7 @@ public:
default: eq->sq.invalidate(tid); SPU.In_MBox.PushUncond(CELL_ECANCELED); return;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (Emu.IsStopped())
{
LOG_WARNING(Log::SPU, "sys_spu_thread_receive_event(spuq=0x%x) aborted", spuq);

View File

@ -1,6 +1,5 @@
#include "stdafx.h"
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "vfsDir.h"

View File

@ -1,6 +1,5 @@
#include "stdafx.h"
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "vfsFile.h"

View File

@ -51,8 +51,7 @@ void GLProgram::Create(const u32 vp, const u32 fp)
if (bufLength)
{
char* buf = new char[bufLength+1];
memset(buf, 0, bufLength+1);
char* buf = new char[bufLength+1]();
glGetProgramInfoLog(id, bufLength, NULL, buf);
LOG_ERROR(RSX, "Could not link program: %s", buf);
delete[] buf;
@ -70,8 +69,7 @@ void GLProgram::Create(const u32 vp, const u32 fp)
if (bufLength)
{
char* buf = new char[bufLength];
memset(buf, 0, bufLength);
char* buf = new char[bufLength]();
glGetProgramInfoLog(id, bufLength, NULL, buf);
LOG_ERROR(RSX, "Could not link program: %s", buf);
delete[] buf;

View File

@ -2409,7 +2409,7 @@ void RSXThread::Task()
continue;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
is_vblank_stopped = true;
@ -2446,7 +2446,7 @@ void RSXThread::Task()
m_sem_flush.post_and_wait();
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}
@ -2510,7 +2510,7 @@ void RSXThread::Task()
while (!is_vblank_stopped)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
LOG_NOTICE(RSX, "RSX thread ended");

View File

@ -94,6 +94,7 @@ void MemoryBlock::Free()
void MemoryBlock::Delete()
{
Free();
safe_free(mem);
Init();
}

View File

@ -69,7 +69,7 @@ again:
LOG_WARNING(HLE, "Callback::Branch() aborted");
return 0;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
std::lock_guard<std::mutex> lock(cb_mutex);
@ -112,7 +112,7 @@ again:
LOG_WARNING(HLE, "Callback::Branch(true) aborted (end)");
return 0;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
return thr.GetExitStatus();

View File

@ -39,7 +39,7 @@ next:
LOG_WARNING(HLE, "adecRawRead(): aborted");
return 0;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
switch (adec.job.Peek().type)
@ -212,13 +212,13 @@ u32 adecOpen(AudioDecoder* data)
if (!adec.job.GetCountUnsafe() && adec.is_running)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}
/*if (adec.frames.GetCount() >= 50)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}*/
@ -283,8 +283,7 @@ u32 adecOpen(AudioDecoder* data)
if (size)
{
data = (u8*)av_malloc(size + FF_INPUT_BUFFER_PADDING_SIZE);
memset(data + size, 0, FF_INPUT_BUFFER_PADDING_SIZE);
data = (u8*)av_calloc(1, size + FF_INPUT_BUFFER_PADDING_SIZE);
this->size = size + FF_INPUT_BUFFER_PADDING_SIZE;
}
else
@ -618,7 +617,7 @@ int cellAdecClose(u32 handle)
LOG_WARNING(HLE, "cellAdecClose(%d) aborted", handle);
break;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
if (adec->adecCb) Emu.GetCPU().RemoveThread(adec->adecCb->GetId());
@ -728,7 +727,7 @@ int cellAdecGetPcm(u32 handle, u32 outBuffer_addr)
}
// copy data
u8* out = (u8*)malloc(af.size);
u8* out = (u8*)calloc(1, af.size);
// reverse byte order, extract data:
float* in_f[2];
@ -774,7 +773,7 @@ int cellAdecGetPcmItem(u32 handle, mem32_t pcmItem_ptr)
if (adec->frames.IsEmpty())
{
Sleep(1); // hack
std::this_thread::sleep_for(std::chrono::milliseconds(1)); // hack
return CELL_ADEC_ERROR_EMPTY;
}

View File

@ -157,7 +157,7 @@ int cellAudioInit()
// precise time of sleeping: 5,(3) ms (or 256/48000 sec)
if (m_config.counter * 256000000 / 48000 >= stamp0 - m_config.start_time)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}
@ -469,7 +469,7 @@ abort:
while (!internal_finished)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
m_config.m_is_audio_finalized = true;
@ -483,7 +483,7 @@ abort:
LOG_WARNING(HLE, "cellAudioInit() aborted");
return CELL_OK;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
return CELL_OK;
@ -502,7 +502,7 @@ int cellAudioQuit()
while (!m_config.m_is_audio_finalized)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (Emu.IsStopped())
{
LOG_WARNING(HLE, "cellAudioQuit(): aborted");

View File

@ -148,14 +148,14 @@ u32 dmuxOpen(Demuxer* data)
if (es.isfull())
{
stream = backup;
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}
/*if (es.hasunseen()) // hack, probably useless
{
stream = backup;
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}*/
@ -194,7 +194,7 @@ u32 dmuxOpen(Demuxer* data)
ElementaryStream& es = *esAVC[ch];
if (es.isfull())
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}
@ -214,7 +214,7 @@ u32 dmuxOpen(Demuxer* data)
/*if (es.hasunseen()) // hack, probably useless
{
stream = backup;
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}*/
es.finish(stream);
@ -237,7 +237,7 @@ u32 dmuxOpen(Demuxer* data)
if (es.isfull())
{
stream = backup;
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}
@ -598,7 +598,7 @@ int cellDmuxClose(u32 demuxerHandle)
return CELL_OK;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
if (dmux->dmuxCb) Emu.GetCPU().RemoveThread(dmux->dmuxCb->GetId());
@ -629,7 +629,7 @@ int cellDmuxSetStream(u32 demuxerHandle, const u32 streamAddress, u32 streamSize
LOG_WARNING(HLE, "cellDmuxSetStream(%d) aborted (waiting)", demuxerHandle);
return CELL_OK;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return CELL_DMUX_ERROR_BUSY;
}

View File

@ -185,7 +185,7 @@ int cellMsgDialogOpen2(u32 type, mem_list_ptr_t<u8> msgString, mem_func_ptr_t<Ce
while (!m_signal)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
while (g_msg_dialog_state == msgDialogOpen || get_system_time() < m_wait_until)
@ -195,7 +195,7 @@ int cellMsgDialogOpen2(u32 type, mem_list_ptr_t<u8> msgString, mem_func_ptr_t<Ce
g_msg_dialog_state = msgDialogAbort;
break;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
if (callback && (g_msg_dialog_state != msgDialogAbort))

View File

@ -1,8 +1,6 @@
#include "stdafx.h"
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/SysCalls/SC_FUNC.h"
#include "Emu/SysCalls/Modules.h"

View File

@ -90,7 +90,7 @@ int cellSyncMutexLock(mem_ptr_t<CellSyncMutex> mutex)
while (old_order != mutex->m_freed)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (Emu.IsStopped())
{
LOG_WARNING(HLE, "cellSyncMutexLock(mutex=0x%x) aborted", mutex.GetAddr());

View File

@ -2,9 +2,9 @@
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/SysCalls/SC_FUNC.h"
#include "Emu/SysCalls/Modules.h"
#include "Emu/DbgCommand.h"
#include "Emu/FS/vfsFile.h"
#include "Emu/Audio/sysutil_audio.h"
@ -345,7 +345,7 @@ int cellSysutilCheckCallback()
while (thr.IsAlive())
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (Emu.IsStopped())
{
LOG_WARNING(HLE, "cellSysutilCheckCallback() aborted");

View File

@ -38,7 +38,7 @@ next:
LOG_WARNING(HLE, "vdecRead(): aborted");
return 0;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
switch (vdec.job.Peek().type)
@ -150,13 +150,13 @@ u32 vdecOpen(VideoDecoder* data)
if (!vdec.job.GetCountUnsafe() && vdec.is_running)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}
if (vdec.frames.GetCount() >= 50)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}
@ -509,7 +509,7 @@ int cellVdecClose(u32 handle)
LOG_WARNING(HLE, "cellVdecClose(%d) aborted", handle);
break;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
if (vdec->vdecCb) Emu.GetCPU().RemoveThread(vdec->vdecCb->GetId());
@ -543,13 +543,13 @@ int cellVdecEndSeq(u32 handle)
/*if (!vdec->job.IsEmpty())
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return CELL_VDEC_ERROR_BUSY; // ???
}
if (!vdec->frames.IsEmpty())
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return CELL_VDEC_ERROR_BUSY; // ???
}*/
@ -560,7 +560,7 @@ int cellVdecEndSeq(u32 handle)
LOG_WARNING(HLE, "cellVdecEndSeq(%d) aborted", handle);
return CELL_OK;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
vdec->job.Push(VdecTask(vdecEndSeq));
@ -680,7 +680,7 @@ int cellVdecGetPicItem(u32 handle, mem32_t picItem_ptr)
if (vdec->frames.IsEmpty())
{
Sleep(1); // hack
std::this_thread::sleep_for(std::chrono::milliseconds(1)); // hack
return CELL_VDEC_ERROR_EMPTY;
}

View File

@ -363,7 +363,7 @@ int cellSurMixerCreate(const mem_ptr_t<CellSurMixerConfig> config)
if (mixcount > (port.tag + 14)) // preemptive buffer filling (probably hack)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
continue;
}

View File

@ -148,7 +148,7 @@ void fsAioRead(u32 fd, mem_ptr_t<CellFsAio> aio, int xid, mem_func_ptr_t<void (*
{
while (g_FsAioReadCur != xid)
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (Emu.IsStopped())
{
LOG_WARNING(HLE, "fsAioRead() aborted");

View File

@ -94,7 +94,7 @@ s32 sys_event_queue_destroy(u32 equeue_id, int mode)
eq->sq.m_mutex.unlock();
while (eq->sq.list.size())
{
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (Emu.IsStopped())
{
LOG_WARNING(HLE, "sys_event_queue_destroy(equeue=%d) aborted", equeue_id);
@ -222,7 +222,7 @@ s32 sys_event_queue_receive(u32 equeue_id, mem_ptr_t<sys_event_data> event, u64
default: eq->sq.invalidate(tid); return CELL_ECANCELED;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (counter++ > timeout || Emu.IsStopped())
{
if (Emu.IsStopped()) LOG_WARNING(HLE, "sys_event_queue_receive(equeue=%d) aborted", equeue_id);
@ -569,7 +569,7 @@ s32 sys_event_flag_wait(u32 eflag_id, u64 bitptn, u32 mode, mem64_t result, u64
return CELL_ECANCELED;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (counter++ > max_counter)
{

View File

@ -245,7 +245,7 @@ s32 sys_lwcond_wait(mem_ptr_t<sys_lwcond_t> lwcond, u64 timeout)
return CELL_OK;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (counter++ > max_counter)
{

View File

@ -253,7 +253,7 @@ int sys_lwmutex_t::trylock(be_t<u32> tid)
LOG_WARNING(HLE, "(hack) sys_lwmutex_t::(try)lock aborted (waiting for recursive attribute, attr=0x%x)", (u32)attribute);
return CELL_ESRCH;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}*/
if (tid == owner_tid)

View File

@ -32,7 +32,8 @@ void sys_ppu_thread_exit(u64 errorcode)
s32 sys_ppu_thread_yield()
{
sysPrxForUser->Log("sys_ppu_thread_yield()");
Sleep(1);
// Note: Or do we actually want to yield?
std::this_thread::sleep_for(std::chrono::milliseconds(1));
return CELL_OK;
}
@ -50,7 +51,7 @@ s32 sys_ppu_thread_join(u64 thread_id, mem64_t vptr)
LOG_WARNING(PPU, "sys_ppu_thread_join(%d) aborted", thread_id);
return CELL_OK;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
vptr = thr->GetExitStatus();

View File

@ -1,7 +1,5 @@
#include "stdafx.h"
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/SysCalls/SysCalls.h"
#include "sys_rwlock.h"
@ -72,7 +70,7 @@ s32 sys_rwlock_rlock(u32 rw_lock_id, u64 timeout)
LOG_WARNING(HLE, "sys_rwlock_rlock(rw_lock_id=%d, ...) aborted", rw_lock_id);
return CELL_ETIMEDOUT;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (rw->rlock_trylock(tid)) return CELL_OK;
@ -135,7 +133,7 @@ s32 sys_rwlock_wlock(u32 rw_lock_id, u64 timeout)
LOG_WARNING(HLE, "sys_rwlock_wlock(rw_lock_id=%d, ...) aborted", rw_lock_id);
return CELL_ETIMEDOUT;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (rw->wlock_trylock(tid, true)) return CELL_OK;

View File

@ -370,7 +370,7 @@ s32 sys_spu_thread_group_join(u32 id, mem32_t cause, mem32_t status)
LOG_WARNING(Log::SPU, "sys_spu_thread_group_join(id=%d, ...) aborted", id);
return CELL_OK;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
}

View File

@ -2,7 +2,7 @@
#include "Utilities/Log.h"
#include "Emu/Memory/Memory.h"
#include "Emu/System.h"
#include "Ini.h"
//#include "Ini.h"
#include "Emu/GameInfo.h"
#include "Emu/SysCalls/Static.h"
@ -12,6 +12,7 @@
#include "Emu/Cell/PPUInstrTable.h"
#include "Emu/FS/vfsFile.h"
#include "Emu/FS/vfsDeviceLocalFile.h"
#include "Emu/DbgCommand.h"
#include "Emu/CPU/CPUThreadManager.h" //gui dependency
@ -388,7 +389,7 @@ void Emulator::Stop()
LOG_NOTICE(HLE, "All threads stopped...");
break;
}
Sleep(1);
std::this_thread::sleep_for(std::chrono::milliseconds(1));
if (counter++ > 3000)
{
LOG_ERROR(HLE, "%d threads not stopped (timeout)", (u32)(g_thread_count - uncounted));

View File

@ -8,10 +8,7 @@
#include "Emu/GS/GSManager.h"
#include "Emu/Audio/AudioManager.h"
#include "Emu/FS/VFS.h"
#include "Emu/DbgCommand.h"
#include "Emu/SysCalls/Static.h"
#include "Loader/Loader.h"
#include "SysCalls/Callback.h"
enum Status
{

View File

@ -220,7 +220,8 @@ struct WaitDumperThread : public ThreadBase
{
for(uint i=0; i<cores; i++)
{
while(done[i] == false) Sleep(1);
while(done[i] == false)
std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
LOG_NOTICE(HLE, "Saving dump is started!");