/* ------------------------------------------------------------------------ Main thread for the ezbgm module. After execution, initialize interrupt environment, register command, and then wait until there is a request from the EE. ------------------------------------------------------------------------ */ int sce_bgm_loop() { sceSifQueueData qd; sceSifServeData sd; //-- Initialize interrupt environment in advance. CpuEnableIntr(); EnableIntr( INUM_DMA_4 ); EnableIntr( INUM_DMA_7 ); //--- Register function that is called according to request sceSifInitRpc(0); sceSifSetRpcQueue( &qd, GetThreadId() ); sceSifRegisterRpc( &sd, EZBGM_DEV, bgmFunc, (void*)gRpcArg, NULL, NULL, &qd ); PRINTF(("goto bgm cmd loop\n")); //--- Command-wait loop sceSifRpcLoop(&qd); return 0; }
void rpc_thread(void *d) { printf(BANNER, VER_MAJOR, VER_MINOR); sceSifInitRpc(0); sceSifSetRpcQueue(&queue, GetThreadId()); sceSifRegisterRpc(&server, BINDID_PS2SND, (void*)rpc_server, rpc_buffer[0], 0, 0, &queue); sceSifRpcLoop(&queue); }
//-------------------------------------------------------------- void thread_rpc_S_0A10(void* arg) { if (!sceSifCheckInit()) sceSifInit(); sceSifInitRpc(0); sceSifSetRpcQueue(&rpc_qdS_0A10, GetThreadId()); sceSifRegisterRpc(&rpc_sdS_0A10, 0x80000a10, (void *)cb_rpc_S_0A10, &ntpbserver_rpc_buf, NULL, NULL, &rpc_qdS_0A10); sceSifRpcLoop(&rpc_qdS_0A10); }
//-------------------------------------------------------------- void thread_rpc_S_0400(void* arg) { if (!sceSifCheckInit()) sceSifInit(); sceSifInitRpc(0); sceSifSetRpcQueue(&mcserv_qdS_0400, GetThreadId()); sceSifRegisterRpc(&mcserv_sdS_0400, 0x80000400, (void *)cb_rpc_S_0400, &mcserv_rpc_buf, NULL, NULL, &mcserv_qdS_0400); sceSifRpcLoop(&mcserv_qdS_0400); }
void rpcMainThread(void* param) { //int ret=-1; int tid; sceSifInitRpc(0); tid = GetThreadId(); sceSifSetRpcQueue(&rpc_queue, tid); sceSifRegisterRpc(&rpc_server, BIND_RPC_ID, (void *) rpcCommandHandler, (u8 *) &_rpc_buffer, 0, 0, &rpc_queue); sceSifRpcLoop(&rpc_queue); }
static void rpc_end_thread(void *unused) { if (!sceSifCheckInit()) sceSifInit(); sceSifInitRpc(0); sceSifSetRpcQueue(&end_qd, GetThreadId()); sceSifRegisterRpc(&end_sd, RPCS_ATA_DMA_END, rpc_end_func, NULL, NULL, NULL, &end_qd); sceSifRpcLoop(&end_qd); }
static void rpc_thread(void *unused) { if (!sceSifCheckInit()) sceSifInit(); sceSifInitRpc(0); sceSifSetRpcQueue(&qd, GetThreadId()); sceSifRegisterRpc(&sd, RPCS_ATA_DMA_BEGIN, rpc_func, &dma_transfer, NULL, NULL, &qd); sceSifRpcLoop(&qd); }
//------------------------------------------------------------------------- void init_thread(void *args) { if (!sceSifCheckInit()) sceSifInit(); sceSifInitRpc(0); cdvdfsv_buf = AllocSysMemory(ALLOC_FIRST, (CDVDFSV_BUF_SECTORS << 11)+2048, NULL); if (!cdvdfsv_buf) SleepThread(); cdvdfsv_startrpcthreads(); }