mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-03 15:54:39 +00:00
Fix this issue https://forums.libretro.com/t/issue-linking-libco/14482
This commit is contained in:
parent
08e61230e9
commit
9889f34180
@ -74,7 +74,7 @@ static unsigned char co_swap_function[] = {
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
void co_init(void)
|
||||
static void co_init(void)
|
||||
{
|
||||
DWORD old_privileges;
|
||||
VirtualProtect(co_swap_function,
|
||||
@ -105,7 +105,7 @@ static unsigned char co_swap_function[] = {
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
void co_init(void)
|
||||
static void co_init(void)
|
||||
{
|
||||
unsigned long long addr = (unsigned long long)co_swap_function;
|
||||
unsigned long long base = addr - (addr % sysconf(_SC_PAGESIZE));
|
||||
@ -113,7 +113,7 @@ void co_init(void)
|
||||
mprotect((void*)base, size, PROT_READ | PROT_WRITE | PROT_EXEC);
|
||||
}
|
||||
#else
|
||||
void co_init(void) {}
|
||||
static void co_init(void) {}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -22,7 +22,7 @@ extern "C" {
|
||||
static thread_local uint32_t co_active_buffer[64];
|
||||
static thread_local cothread_t co_active_handle;
|
||||
|
||||
asm (
|
||||
__asm__ (
|
||||
#if defined(__thumb2__)
|
||||
".thumb\n"
|
||||
".align 2\n"
|
||||
|
@ -35,7 +35,7 @@ extern "C" {
|
||||
0xe12fff1e, /* bx lr */
|
||||
};
|
||||
|
||||
void co_init()
|
||||
static void co_init()
|
||||
{
|
||||
int ret;
|
||||
void *base;
|
||||
|
@ -29,7 +29,7 @@ int32_t sceFiberSwitch(SceFiber* fiber, uint32_t argOnRunTo, uint32_t* argOnRun)
|
||||
|
||||
int32_t sceFiberReturnToThread(uint32_t argOnReturn, uint32_t* argOnRun);
|
||||
|
||||
void co_thunk(uint32_t argOnInitialize, uint32_t argOnRun)
|
||||
static void co_thunk(uint32_t argOnInitialize, uint32_t argOnRun)
|
||||
{
|
||||
((void (*)(void))argOnInitialize)();
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ static unsigned char co_swap_function[] = {
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
|
||||
void co_init(void)
|
||||
static void co_init(void)
|
||||
{
|
||||
DWORD old_privileges;
|
||||
VirtualProtect(co_swap_function,
|
||||
@ -54,7 +54,7 @@ void co_init(void)
|
||||
#include <unistd.h>
|
||||
#include <sys/mman.h>
|
||||
|
||||
void co_init(void)
|
||||
static void co_init(void)
|
||||
{
|
||||
unsigned long addr = (unsigned long)co_swap_function;
|
||||
unsigned long base = addr - (addr % sysconf(_SC_PAGESIZE));
|
||||
|
Loading…
x
Reference in New Issue
Block a user