diff --git a/bsnes/sfc/coprocessor/icd/icd.cpp b/bsnes/sfc/coprocessor/icd/icd.cpp index d5a7f12d..ab2f7462 100644 --- a/bsnes/sfc/coprocessor/icd/icd.cpp +++ b/bsnes/sfc/coprocessor/icd/icd.cpp @@ -48,10 +48,7 @@ namespace SameBoy { } auto ICD::synchronizeCPU() -> void { - if(clock >= 0) { - scheduler.desynchronize(); - co_switch(cpu.thread); - } + if(clock >= 0) scheduler.resume(cpu.thread); } auto ICD::Enter() -> void { diff --git a/bsnes/sfc/coprocessor/sa1/sa1.cpp b/bsnes/sfc/coprocessor/sa1/sa1.cpp index 5e487f7a..de9593e7 100644 --- a/bsnes/sfc/coprocessor/sa1/sa1.cpp +++ b/bsnes/sfc/coprocessor/sa1/sa1.cpp @@ -12,10 +12,7 @@ namespace SuperFamicom { SA1 sa1; auto SA1::synchronizeCPU() -> void { - if(clock >= 0) { - scheduler.desynchronize(); - co_switch(cpu.thread); - } + if(clock >= 0) scheduler.resume(cpu.thread); } auto SA1::Enter() -> void { diff --git a/bsnes/sfc/smp/smp.cpp b/bsnes/sfc/smp/smp.cpp index 9a746b9a..4002855a 100644 --- a/bsnes/sfc/smp/smp.cpp +++ b/bsnes/sfc/smp/smp.cpp @@ -9,10 +9,7 @@ SMP smp; #include "serialization.cpp" auto SMP::synchronizeCPU() -> void { - if(clock >= 0) { - scheduler.desynchronize(); - co_switch(cpu.thread); - } + if(clock >= 0) scheduler.resume(cpu.thread); } auto SMP::synchronizeDSP() -> void { diff --git a/libco/amd64.c b/libco/amd64.c index 686b8565..e56924f3 100755 --- a/libco/amd64.c +++ b/libco/amd64.c @@ -168,20 +168,6 @@ void co_switch(cothread_t handle) { co_swap(co_active_handle = handle, co_previous_handle); } -unsigned int co_size(unsigned int size) { - size += 512; - size &= ~15; - return size; -} - -void co_save(cothread_t handle, void* memory, unsigned int size) { - memcpy(memory, handle, size); -} - -void co_load(cothread_t handle, const void* memory, unsigned int size) { - memcpy(handle, memory, size); -} - #ifdef __cplusplus } #endif diff --git a/libco/libco.h b/libco/libco.h index 0a5db70a..b7f60852 100755 --- a/libco/libco.h +++ b/libco/libco.h @@ -18,9 +18,6 @@ cothread_t co_derive(void*, unsigned int, void (*)(void)); cothread_t co_create(unsigned int, void (*)(void)); void co_delete(cothread_t); void co_switch(cothread_t); -unsigned int co_size(unsigned int); -void co_save(cothread_t, void*, unsigned int); -void co_load(cothread_t, const void*, unsigned int); #ifdef __cplusplus }