示例#1
0
static inline void save_complete(void)
{
	/* Save, Step 18:
	 *    Issue a stop-and-signal instruction indicating
	 *    "save complete".  Note: This function will not
	 *    return!!
	 */
	spu_stop(SPU_SAVE_COMPLETE);
}
int spu_thread_receive_event(uint32_t spuq,uint32_t *data0,uint32_t *data1,uint32_t *data2)
{
	int ret;

	if(spu_readchcnt(SPU_RdInMbox)>0) return 0x8001000A;

	spu_writech(SPU_WrOutMbox,spuq);
	spu_stop(0x110);

	ret = spu_readch(SPU_RdInMbox);
	if(ret) return ret;

	*data0 = spu_readch(SPU_RdInMbox);
	*data1 = spu_readch(SPU_RdInMbox);
	*data2 = spu_readch(SPU_RdInMbox);

	return ret;
}
示例#3
0
void spu_thread_group_exit(int status)
{
	spu_writech(SPU_WrOutMbox,status);
	spu_stop(0x101);
}