void fileXio_Thread(void* param) { int OldState; printf("fileXio: fileXio RPC Server v1.00\nCopyright (c) 2003 adresd\n"); #ifdef DEBUG printf("fileXio: RPC Initialize\n"); #endif SifInitRpc(0); RWBufferSize=DEFAULT_RWSIZE; CpuSuspendIntr(&OldState); rwbuf = AllocSysMemory(ALLOC_FIRST, RWBufferSize, NULL); CpuResumeIntr(OldState); if (rwbuf == NULL) { #ifdef DEBUG printf("Failed to allocate memory for RW buffer!\n"); #endif SleepThread(); } SifSetRpcQueue(&qd, GetThreadId()); SifRegisterRpc(&sd0, FILEXIO_IRX, &fileXio_rpc_server, fileXio_rpc_buffer, NULL, NULL, &qd); SifRpcLoop(&qd); }
static void PowerOffThread(void *dat) { static unsigned char cb_rpc_buffer[64] __attribute__((aligned(64))); SifSetRpcQueue(&cb_queue, GetThreadId()); SifRegisterRpc(&cb_srv, PWROFF_IRX, &PowerOff_ee_rpc_handler, cb_rpc_buffer, NULL, NULL, &cb_queue); SifRpcLoop(&cb_queue); }
static void rpc_server_thread(void *arg) { static unsigned char cb_rpc_buffer[64] __attribute__((aligned(64))); SifSetRpcQueue(&cb_queue, GetThreadId()); SifRegisterRpc(&cb_srv, AUDSRV_IRX, &audsrv_ee_rpc_handler, cb_rpc_buffer, NULL, NULL, &cb_queue); SifRpcLoop(&cb_queue); }
/** RPC listener thread @param arg not used This is the main RPC thread. Nothing fancy here. */ static void rpc_server_thread(void *arg) { SifInitRpc(0); printf("audsrv: creating rpc server\n"); SifSetRpcQueue(&qd, GetThreadId()); SifRegisterRpc(&sd0, AUDSRV_IRX, (void *)rpc_command, rpc_buffer, 0, 0, &qd); SifRpcLoop(&qd); }
/*! \brief naplink compatbile RPC handler thread. * \ingroup fakehost * * \param arg Startup parameters. */ static void napThread(void *arg) { int pid; SifInitRpc(0); pid = GetThreadId(); SifSetRpcQueue(&queue, pid); SifRegisterRpc(&server, RPC_NPM_USER, naplinkRpcHandler, rpc_buffer, 0, 0, &queue); SifRpcLoop(&queue); // Never exits ExitDeleteThread(); }
static void sior_thread(void) { SifInitRpc(0); SifSetRpcQueue(&qd, GetThreadId()); SifRegisterRpc(&Sd0, SIOR_IRX, (SifRpcFunc_t)sior_rpc_server, buffer, NULL, NULL, &qd); SifRpcLoop(&qd); }
void rpcThread(void *param) { SifInitRpc(0); SifSetRpcQueue(&qd, GetThreadId()); SifRegisterRpc(&sd0, CDVDFS_IRX_ID, rpcServer, (void *)rpcBuffer, 0, 0, &qd); SifRpcLoop(&qd); }