Merge pull request #572 from lioncash/prototypes

core: Apply static to local functions
This commit is contained in:
bunnei 2015-02-13 15:53:34 -05:00
commit 29a9e4ac25
11 changed files with 252 additions and 245 deletions

File diff suppressed because it is too large Load diff

View file

@ -4,4 +4,6 @@
#pragma once
#include "core/arm/skyeye_common/armdefs.h"
unsigned InterpreterMainLoop(ARMul_State* state);

View file

@ -2,6 +2,7 @@
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.
#include "core/arm/dyncom/arm_dyncom_run.h"
#include "core/arm/skyeye_common/armdefs.h"
void switch_mode(ARMul_State* core, uint32_t mode) {

View file

@ -18,6 +18,8 @@
#pragma once
#include "core/arm/skyeye_common/armdefs.h"
void switch_mode(ARMul_State* core, uint32_t mode);
/* FIXME, we temporarily think thumb instruction is always 16 bit */

View file

@ -19,7 +19,7 @@ typedef struct _vmla_inst {
} vmla_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmla)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmla)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmla_inst));
vmla_inst *inst_cream = (vmla_inst *)inst_base->component;
@ -69,7 +69,7 @@ typedef struct _vmls_inst {
} vmls_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmls)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmls)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmls_inst));
vmls_inst *inst_cream = (vmls_inst *)inst_base->component;
@ -119,7 +119,7 @@ typedef struct _vnmla_inst {
} vnmla_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vnmla)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vnmla)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vnmla_inst));
vnmla_inst *inst_cream = (vnmla_inst *)inst_base->component;
@ -170,7 +170,7 @@ typedef struct _vnmls_inst {
} vnmls_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vnmls)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vnmls)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vnmls_inst));
vnmls_inst *inst_cream = (vnmls_inst *)inst_base->component;
@ -220,7 +220,7 @@ typedef struct _vnmul_inst {
} vnmul_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vnmul)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vnmul)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vnmul_inst));
vnmul_inst *inst_cream = (vnmul_inst *)inst_base->component;
@ -270,7 +270,7 @@ typedef struct _vmul_inst {
} vmul_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmul)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmul)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmul_inst));
vmul_inst *inst_cream = (vmul_inst *)inst_base->component;
@ -320,7 +320,7 @@ typedef struct _vadd_inst {
} vadd_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vadd)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vadd)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vadd_inst));
vadd_inst *inst_cream = (vadd_inst *)inst_base->component;
@ -370,7 +370,7 @@ typedef struct _vsub_inst {
} vsub_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vsub)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vsub)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vsub_inst));
vsub_inst *inst_cream = (vsub_inst *)inst_base->component;
@ -420,7 +420,7 @@ typedef struct _vdiv_inst {
} vdiv_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vdiv)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vdiv)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vdiv_inst));
vdiv_inst *inst_cream = (vdiv_inst *)inst_base->component;
@ -472,7 +472,7 @@ typedef struct _vmovi_inst {
} vmovi_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmovi)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovi)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmovi_inst));
vmovi_inst *inst_cream = (vmovi_inst *)inst_base->component;
@ -521,7 +521,7 @@ typedef struct _vmovr_inst {
} vmovr_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmovr)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovr)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmovr_inst));
vmovr_inst *inst_cream = (vmovr_inst *)inst_base->component;
@ -564,7 +564,7 @@ typedef struct _vabs_inst {
} vabs_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vabs)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vabs)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vabs_inst));
vabs_inst *inst_cream = (vabs_inst *)inst_base->component;
@ -615,7 +615,7 @@ typedef struct _vneg_inst {
} vneg_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vneg)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vneg)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vneg_inst));
vneg_inst *inst_cream = (vneg_inst *)inst_base->component;
@ -665,7 +665,7 @@ typedef struct _vsqrt_inst {
} vsqrt_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vsqrt)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vsqrt)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vsqrt_inst));
vsqrt_inst *inst_cream = (vsqrt_inst *)inst_base->component;
@ -715,7 +715,7 @@ typedef struct _vcmp_inst {
} vcmp_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vcmp)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vcmp)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vcmp_inst));
vcmp_inst *inst_cream = (vcmp_inst *)inst_base->component;
@ -765,7 +765,7 @@ typedef struct _vcmp2_inst {
} vcmp2_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vcmp2)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vcmp2)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vcmp2_inst));
vcmp2_inst *inst_cream = (vcmp2_inst *)inst_base->component;
@ -815,7 +815,7 @@ typedef struct _vcvtbds_inst {
} vcvtbds_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vcvtbds)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vcvtbds)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vcvtbds_inst));
vcvtbds_inst *inst_cream = (vcvtbds_inst *)inst_base->component;
@ -865,7 +865,7 @@ typedef struct _vcvtbff_inst {
} vcvtbff_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vcvtbff)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vcvtbff)(unsigned int inst, int index)
{
VFP_DEBUG_UNTESTED(VCVTBFF);
@ -917,7 +917,7 @@ typedef struct _vcvtbfi_inst {
} vcvtbfi_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vcvtbfi)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vcvtbfi)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vcvtbfi_inst));
vcvtbfi_inst *inst_cream = (vcvtbfi_inst *)inst_base->component;
@ -974,7 +974,7 @@ typedef struct _vmovbrs_inst {
} vmovbrs_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrs)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrs)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmovbrs_inst));
vmovbrs_inst *inst_cream = (vmovbrs_inst *)inst_base->component;
@ -1019,7 +1019,7 @@ typedef struct _vmsr_inst {
} vmsr_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmsr)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmsr)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmsr_inst));
vmsr_inst *inst_cream = (vmsr_inst *)inst_base->component;
@ -1068,7 +1068,7 @@ typedef struct _vmovbrc_inst {
} vmovbrc_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrc)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrc)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmovbrc_inst));
vmovbrc_inst *inst_cream = (vmovbrc_inst *)inst_base->component;
@ -1115,7 +1115,7 @@ typedef struct _vmrs_inst {
} vmrs_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmrs)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmrs)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmrs_inst));
vmrs_inst *inst_cream = (vmrs_inst *)inst_base->component;
@ -1199,7 +1199,7 @@ typedef struct _vmovbcr_inst {
} vmovbcr_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbcr)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbcr)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmovbcr_inst));
vmovbcr_inst *inst_cream = (vmovbcr_inst *)inst_base->component;
@ -1253,7 +1253,7 @@ typedef struct _vmovbrrss_inst {
} vmovbrrss_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrrss)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrrss)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmovbrrss_inst));
vmovbrrss_inst *inst_cream = (vmovbrrss_inst *)inst_base->component;
@ -1302,7 +1302,7 @@ typedef struct _vmovbrrd_inst {
} vmovbrrd_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrrd)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vmovbrrd)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vmovbrrd_inst));
vmovbrrd_inst *inst_cream = (vmovbrrd_inst *)inst_base->component;
@ -1356,7 +1356,7 @@ typedef struct _vstr_inst {
} vstr_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vstr)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vstr)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vstr_inst));
vstr_inst *inst_cream = (vstr_inst *)inst_base->component;
@ -1415,7 +1415,7 @@ typedef struct _vpush_inst {
} vpush_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vpush)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vpush)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vpush_inst));
vpush_inst *inst_cream = (vpush_inst *)inst_base->component;
@ -1481,7 +1481,7 @@ typedef struct _vstm_inst {
} vstm_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vstm)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vstm)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vstm_inst));
vstm_inst *inst_cream = (vstm_inst *)inst_base->component;
@ -1551,7 +1551,7 @@ typedef struct _vpop_inst {
} vpop_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vpop)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vpop)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vpop_inst));
vpop_inst *inst_cream = (vpop_inst *)inst_base->component;
@ -1621,7 +1621,7 @@ typedef struct _vldr_inst {
} vldr_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vldr)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vldr)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vldr_inst));
vldr_inst *inst_cream = (vldr_inst *)inst_base->component;
@ -1687,7 +1687,7 @@ typedef struct _vldm_inst {
} vldm_inst;
#endif
#ifdef VFP_INTERPRETER_TRANS
ARM_INST_PTR INTERPRETER_TRANSLATE(vldm)(unsigned int inst, int index)
static ARM_INST_PTR INTERPRETER_TRANSLATE(vldm)(unsigned int inst, int index)
{
arm_inst *inst_base = (arm_inst *)AllocBuffer(sizeof(arm_inst) + sizeof(vldm_inst));
vldm_inst *inst_cream = (vldm_inst *)inst_base->component;

View file

@ -69,7 +69,7 @@ using AdvanceCallback = void(int cycles_executed);
static AdvanceCallback* advance_callback = nullptr;
static std::vector<MHzChangeCallback> mhz_change_callbacks;
void FireMhzChange() {
static void FireMhzChange() {
for (auto callback : mhz_change_callbacks)
callback();
}
@ -97,7 +97,7 @@ u64 GetGlobalTimeUs() {
return last_global_time_us + us_since_last;
}
Event* GetNewEvent() {
static Event* GetNewEvent() {
if (!event_pool)
return new Event;
@ -106,7 +106,7 @@ Event* GetNewEvent() {
return event;
}
Event* GetNewTsEvent() {
static Event* GetNewTsEvent() {
allocated_ts_events++;
if (!event_ts_pool)
@ -117,12 +117,12 @@ Event* GetNewTsEvent() {
return event;
}
void FreeEvent(Event* event) {
static void FreeEvent(Event* event) {
event->next = event_pool;
event_pool = event;
}
void FreeTsEvent(Event* event) {
static void FreeTsEvent(Event* event) {
event->next = event_ts_pool;
event_ts_pool = event;
allocated_ts_events--;
@ -133,7 +133,7 @@ int RegisterEvent(const char* name, TimedCallback callback) {
return (int)event_types.size() - 1;
}
void AntiCrashCallback(u64 userdata, int cycles_late) {
static void AntiCrashCallback(u64 userdata, int cycles_late) {
LOG_CRITICAL(Core_Timing, "Savestate broken: an unregistered event was called.");
Core::Halt("invalid timing events");
}
@ -228,7 +228,7 @@ void ClearPendingEvents() {
}
}
void AddEventToQueue(Event* new_event) {
static void AddEventToQueue(Event* new_event) {
Event* prev_event = nullptr;
Event** next_event = &first;
for (;;) {

View file

@ -22,7 +22,7 @@ static std::vector<ModuleDef> g_module_db;
bool g_reschedule = false; ///< If true, immediately reschedules the CPU to a new thread
const FunctionDef* GetSVCInfo(u32 opcode) {
static const FunctionDef* GetSVCInfo(u32 opcode) {
u32 func_num = opcode & 0xFFFFFF; // 8 bits
if (func_num > 0xFF) {
LOG_ERROR(Kernel_SVC,"unknown svc=0x%02X", func_num);
@ -63,7 +63,7 @@ void RegisterModule(std::string name, int num_functions, const FunctionDef* func
g_module_db.push_back(module);
}
void RegisterAllModules() {
static void RegisterAllModules() {
SVC::Register();
}

View file

@ -17,7 +17,7 @@ namespace AC_U {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Output connection type, 0 = none, 1 = Old3DS Internet, 2 = New3DS Internet.
*/
void GetWifiStatus(Service::Interface* self) {
static void GetWifiStatus(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
// TODO(purpasmart96): This function is only a stub,

View file

@ -160,7 +160,7 @@ void GetAppletManInfo(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Output, 0 = not registered, 1 = registered.
*/
void IsRegistered(Service::Interface* self) {
static void IsRegistered(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 app_id = cmd_buff[1];
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
@ -191,7 +191,7 @@ void InquireNotification(Service::Interface* self) {
* 0 : Return Header
* 1 : Result of function, 0 on success, otherwise error code
*/
void SendParameter(Service::Interface* self) {
static void SendParameter(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 src_app_id = cmd_buff[1];
u32 dst_app_id = cmd_buff[2];
@ -291,7 +291,7 @@ void GlanceParameter(Service::Interface* self) {
* 2 : Status flag, 0 = failure due to no parameter data being available, or the above enabled
* fields don't match the fields in NS state. 1 = success.
*/
void CancelParameter(Service::Interface* self) {
static void CancelParameter(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 flag1 = cmd_buff[1];
u32 unk = cmd_buff[2];
@ -367,7 +367,7 @@ void GetSharedFont(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void SetAppCpuTimeLimit(Service::Interface* self) {
static void SetAppCpuTimeLimit(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 value = cmd_buff[1];
u32 percent = cmd_buff[2];
@ -390,7 +390,7 @@ void SetAppCpuTimeLimit(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : System core CPU time percentage
*/
void GetAppCpuTimeLimit(Service::Interface* self) {
static void GetAppCpuTimeLimit(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 value = cmd_buff[1];

View file

@ -34,7 +34,7 @@ void SignalInterrupt() {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : (inaddr << 1) + 0x1FF40000 (where 0x1FF00000 is the DSP RAM address)
*/
void ConvertProcessAddressFromDspDram(Service::Interface* self) {
static void ConvertProcessAddressFromDspDram(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 addr = cmd_buff[1];
@ -57,7 +57,7 @@ void ConvertProcessAddressFromDspDram(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Component loaded, 0 on not loaded, 1 on loaded
*/
void LoadComponent(Service::Interface* self) {
static void LoadComponent(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = 0; // No error
@ -74,7 +74,7 @@ void LoadComponent(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 3 : Semaphore event handle
*/
void GetSemaphoreEventHandle(Service::Interface* self) {
static void GetSemaphoreEventHandle(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = RESULT_SUCCESS.raw; // No error
@ -92,7 +92,7 @@ void GetSemaphoreEventHandle(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void RegisterInterruptEvents(Service::Interface* self) {
static void RegisterInterruptEvents(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
auto evt = Kernel::g_handle_table.Get<Kernel::Event>(cmd_buff[4]);
@ -116,7 +116,7 @@ void RegisterInterruptEvents(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void WriteReg0x10(Service::Interface* self) {
static void WriteReg0x10(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
SignalInterrupt();
@ -137,7 +137,7 @@ void WriteReg0x10(Service::Interface* self) {
* 0 : Return header
* 1 : Result of function, 0 on success, otherwise error code
*/
void WriteProcessPipe(Service::Interface* self) {
static void WriteProcessPipe(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 number = cmd_buff[1];
@ -162,7 +162,7 @@ void WriteProcessPipe(Service::Interface* self) {
* 1 : Result of function, 0 on success, otherwise error code
* 2 : Number of bytes read from pipe
*/
void ReadPipeIfPossible(Service::Interface* self) {
static void ReadPipeIfPossible(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 size = cmd_buff[3] & 0xFFFF;// Lower 16 bits are size
@ -200,7 +200,7 @@ void ReadPipeIfPossible(Service::Interface* self) {
* Outputs:
* 1 : Result of function, 0 on success, otherwise error code
*/
void SetSemaphoreMask(Service::Interface* self) {
static void SetSemaphoreMask(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
u32 mask = cmd_buff[1];
@ -219,7 +219,7 @@ void SetSemaphoreMask(Service::Interface* self) {
* 2 : The headphone status response, 0 = Not using headphones?,
* 1 = using headphones?
*/
void GetHeadphoneStatus(Service::Interface* self) {
static void GetHeadphoneStatus(Service::Interface* self) {
u32* cmd_buff = Kernel::GetCommandBuffer();
cmd_buff[1] = RESULT_SUCCESS.raw; // No error

View file

@ -7,6 +7,7 @@
#include "core/core.h"
#include "core/mem_map.h"
#include "core/hle/config_mem.h"
#include "core/hle/shared_page.h"
////////////////////////////////////////////////////////////////////////////////////////////////////