Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions ee/rpc/cdvd/src/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ extern int CdDebug;
extern volatile int CdCallbackNum;
extern volatile int cbSema;

extern int CdThreadId;
extern ee_thread_status_t CdThreadParam;

extern int nCmdSemaId;
extern int sCmdSemaId;

Expand Down
12 changes: 0 additions & 12 deletions ee/rpc/cdvd/src/libcdvd.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,18 @@ volatile int CdCallbackNum;
volatile sceCdCBFunc sceCdCallbackFunc;

// threads
int CdThreadId = 0;
ee_thread_status_t CdThreadParam;
int callbackThreadId = 0;
ee_thread_t callbackThreadParam;

// current command variables

s32 diskReadyMode __attribute__((aligned(64)));
s32 trayReqData __attribute__((aligned(64)));
u32 initMode __attribute__((aligned(64)));

// init stuff
CdInitPkt cdInitRecvBuff __attribute__((aligned(64)));
// searchfile stuff
SearchFilePkt searchFileSendBuff __attribute__((aligned(64)));
u32 searchFileRecvBuff __attribute__((aligned(64)));
#endif

// Prototypes for multimodule
Expand All @@ -117,16 +113,12 @@ extern int callbackSemaId;
extern volatile int cbSema;
extern volatile int CdCallbackNum;
extern volatile sceCdCBFunc sceCdCallbackFunc;
extern int CdThreadId;
extern ee_thread_status_t CdThreadParam;
extern int callbackThreadId;
extern ee_thread_t callbackThreadParam;
extern s32 diskReadyMode;
extern s32 trayReqData;
extern u32 initMode;
extern CdInitPkt cdInitRecvBuff;
extern SearchFilePkt searchFileSendBuff;
extern u32 searchFileRecvBuff;

/* Other Functions */

Expand All @@ -136,7 +128,6 @@ s32 sceCdInit(s32 mode)
if (_CdSyncS(1))
return 0;
sceSifInitRpc(0);
CdThreadId = GetThreadId();
memset(&clientInit, 0, sizeof(clientInit));

while (1) {
Expand Down Expand Up @@ -193,7 +184,6 @@ s32 sceCdSearchFile(sceCdlFILE *file, const char *name)
if (PollSema(nCmdSemaId) != nCmdSemaId)
return 0;
nCmdNum = CD_SERVER_SEARCHFILE;
ReferThreadStatus(CdThreadId, &CdThreadParam);
if (sceCdSync(1)) {
SignalSema(nCmdSemaId);
return 0;
Expand Down Expand Up @@ -337,8 +327,6 @@ s32 sceCdInitEeCB(s32 priority, void *stackAddr, s32 stackSize)
return 0;
}
// initialise callback thread
CdThreadId = GetThreadId();
ReferThreadStatus(CdThreadId, &CdThreadParam);
callbackThreadParam.stack_size = stackSize;
callbackThreadParam.gp_reg = &_gp;
callbackThreadParam.func = &_CdCallbackLoop;
Expand Down
2 changes: 0 additions & 2 deletions ee/rpc/cdvd/src/ncmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,6 @@ u32 cdda_st_buf[64 / sizeof(u32)] ALIGNED(64);
#endif

extern int initVersionCdvdfsv;
extern int bindNcmd;
extern SifRpcClientData_t clientNCmd;
extern int nCmdSemaId;
extern int nCmdNum;
Expand Down Expand Up @@ -807,7 +806,6 @@ int _CdCheckNCmd(int cmd)
}

nCmdNum = cmd;
ReferThreadStatus(CdThreadId, &CdThreadParam);
if (sceCdSync(1)) {
SignalSema(nCmdSemaId);
return 0;
Expand Down
1 change: 0 additions & 1 deletion ee/rpc/cdvd/src/scmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ int _CdCheckSCmd(int cur_cmd)
return 0;
}
sCmdNum = cur_cmd;
ReferThreadStatus(CdThreadId, &CdThreadParam);
if (_CdSyncS(1)) {
SignalSema(sCmdSemaId);
return 0;
Expand Down
4 changes: 1 addition & 3 deletions iop/cdvd/cdvdfsv/src/cdvdfsv.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,11 @@ static void cdvdfsv_parseargs(int ac, char **av)

int sceCdChangeThreadPriority(int priority)
{
iop_thread_info_t thinfo;

if ( (unsigned int)(priority - 9) >= 0x73 )
return -403;
if ( priority == 9 )
priority = 10;
ReferThreadStatus(0, &thinfo);
// Unofficial: remove unused ReferThreadStatus
ChangeThreadPriority(0, 8);
ChangeThreadPriority(g_cdvdfsv_thids[0], priority - 1);
ChangeThreadPriority(g_cdvdfsv_thids[2], priority);
Expand Down
1 change: 0 additions & 1 deletion iop/cdvd/cdvdfsv/src/imports.lst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ I_ExitDeleteThread
I_TerminateThread
I_ChangeThreadPriority
I_GetThreadId
I_ReferThreadStatus
I_DelayThread
I_SetAlarm
I_CancelAlarm
Expand Down
6 changes: 2 additions & 4 deletions iop/input/padman/src/freepad.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,8 @@ void WaitClearEvent(int eventflag, u32 bits, int mode, u32 *resbits_out)
WaitEventFlag(eventflag, bits | EF_EXIT_THREAD, WEF_OR, &resbits);

if( resbits & EF_EXIT_THREAD )
{ //Yes, it's unused. Probably leftover code.
iop_thread_info_t tinfo;

ReferThreadStatus(TH_SELF, &tinfo);
{
// Unofficial: remove unused ReferThreadStatus
SetEventFlag(eventflag, EF_EXIT_THREAD);
ExitThread();
}
Expand Down
Loading