当前位置: 首页>>代码示例>>C++>>正文


C++ channel::warning方法代码示例

本文整理汇总了C++中logs::channel::warning方法的典型用法代码示例。如果您正苦于以下问题:C++ channel::warning方法的具体用法?C++ channel::warning怎么用?C++ channel::warning使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在logs::channel的用法示例。


在下文中一共展示了channel::warning方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: _sys_snprintf

s32 _sys_snprintf(ppu_thread& ppu, vm::ptr<char> dst, u32 count, vm::cptr<char> fmt, ppu_va_args_t va_args)
{
	sysPrxForUser.warning("_sys_snprintf(dst=*0x%x, count=%d, fmt=%s, ...)", dst, count, fmt);

	std::string result = ps3_fmt(ppu, fmt, va_args.count);

	if (!count)
	{
		return 0; // ???
	}
	else
	{
		count = (u32)std::min<size_t>(count - 1, result.size());

		std::memcpy(dst.get_ptr(), result.c_str(), count);
		dst[count] = 0;
		return count;
	}
}
开发者ID:rcaridade145,项目名称:rpcs3,代码行数:19,代码来源:sys_libc_.cpp

示例2: cellMouseInit

s32 cellMouseInit(u32 max_connect)
{
	sys_io.warning("cellMouseInit(max_connect=%d)", max_connect);

	if (max_connect > 7)
	{
		return CELL_MOUSE_ERROR_INVALID_PARAMETER;
	}

	const auto handler = fxm::import<MouseHandlerBase>(Emu.GetCallbacks().get_mouse_handler);

	if (!handler)
	{
		return CELL_MOUSE_ERROR_ALREADY_INITIALIZED;
	}

	handler->Init(max_connect);
	return CELL_OK;
}
开发者ID:KitoHo,项目名称:rpcs3,代码行数:19,代码来源:cellMouse.cpp

示例3: _sys_interrupt_thread_establish

s32 _sys_interrupt_thread_establish(vm::ptr<u32> ih, u32 intrtag, u32 intrthread, u64 arg1, u64 arg2)
{
	sys_interrupt.warning("_sys_interrupt_thread_establish(ih=*0x%x, intrtag=0x%x, intrthread=0x%x, arg1=0x%llx, arg2=0x%llx)", ih, intrtag, intrthread, arg1, arg2);

	LV2_LOCK;

	// Get interrupt tag
	const auto tag = idm::get<lv2_int_tag_t>(intrtag);

	if (!tag)
	{
		return CELL_ESRCH;
	}

	// Get interrupt thread
	const auto it = idm::get<ppu_thread>(intrthread);

	if (!it)
	{
		return CELL_ESRCH;
	}

	// If interrupt thread is running, it's already established on another interrupt tag
	if (!test(it->state & cpu_flag::stop))
	{
		return CELL_EAGAIN;
	}

	// It's unclear if multiple handlers can be established on single interrupt tag
	if (tag->handler)
	{
		sys_interrupt.error("_sys_interrupt_thread_establish(): handler service already exists (intrtag=0x%x) -> CELL_ESTAT", intrtag);
		return CELL_ESTAT;
	}

	tag->handler = idm::make_ptr<lv2_int_serv_t>(it, arg1, arg2);

	it->run();

	*ih = tag->handler->id;

	return CELL_OK;
}
开发者ID:KitoHo,项目名称:rpcs3,代码行数:43,代码来源:sys_interrupt.cpp

示例4: cellSailDescriptorCreateDatabase

s32 cellSailDescriptorCreateDatabase(vm::ptr<CellSailDescriptor> pSelf, vm::ptr<void> pDatabase, u32 size, u64 arg)
{
	cellSail.warning("cellSailDescriptorCreateDatabase(pSelf=*0x%x, pDatabase=*0x%x, size=0x%x, arg=0x%llx)", pSelf, pDatabase, size, arg);

	switch ((s32)pSelf->streamType)
	{
		case CELL_SAIL_STREAM_PAMF:
		{
			u32 addr = pSelf->sp_;
			auto ptr = vm::ptr<CellPamfReader>::make(addr);
			memcpy(pDatabase.get_ptr(), ptr.get_ptr(), sizeof(CellPamfReader));
			break;
		}
		default:
			cellSail.error("Unhandled stream type: %d", pSelf->streamType);
	}

	return CELL_OK;
}
开发者ID:DHrpcs3,项目名称:rpcs3,代码行数:19,代码来源:cellSail.cpp

示例5: sys_prx_unload_module

s32 sys_prx_unload_module(s32 id, u64 flags, vm::ptr<sys_prx_unload_module_option_t> pOpt)
{
	sys_prx.warning("sys_prx_unload_module(id=0x%x, flags=0x%llx, pOpt=*0x%x)", id, flags, pOpt);

	// Get the PRX, free the used memory and delete the object and its ID
	const auto prx = idm::get<lv2_prx_t>(id);

	if (!prx)
	{
		return CELL_ESRCH;
	}

	//Memory.Free(prx->address);

	//s32 result = prx->exit ? prx->exit() : CELL_OK;
	idm::remove<lv2_prx_t>(id);
	
	return CELL_OK;
}
开发者ID:4iDragon,项目名称:rpcs3,代码行数:19,代码来源:sys_prx.cpp

示例6: sys_fs_mkdir

error_code sys_fs_mkdir(vm::cptr<char> path, s32 mode)
{
	sys_fs.warning("sys_fs_mkdir(path=%s, mode=%#o)", path, mode);

	const std::string& local_path = vfs::get(path.get_ptr());

	if (fs::is_dir(local_path))
	{
		return CELL_EEXIST;
	}

	if (!fs::create_path(local_path))
	{
		return CELL_EIO; // ???
	}

	sys_fs.notice("sys_fs_mkdir(): directory %s created", path);
	return CELL_OK;
}
开发者ID:Zangetsu38,项目名称:rpcs3,代码行数:19,代码来源:sys_fs.cpp

示例7: sys_prx_start_module

s32 sys_prx_start_module(s32 id, u64 flags, vm::ptr<sys_prx_start_module_option_t> pOpt)
{
	sys_prx.warning("sys_prx_start_module(id=0x%x, flags=0x%llx, pOpt=*0x%x)", id, flags, pOpt);

	const auto prx = idm::get<lv2_prx_t>(id);

	if (!prx)
	{
		return CELL_ESRCH;
	}

	//if (prx->is_started)
	//	return CELL_PRX_ERROR_ALREADY_STARTED;

	//prx->is_started = true;
	pOpt->entry_point.set(prx->start ? prx->start.addr() : ~0ull);

	return CELL_OK;
}
开发者ID:4iDragon,项目名称:rpcs3,代码行数:19,代码来源:sys_prx.cpp

示例8: _sys_prx_stop_module

error_code _sys_prx_stop_module(u32 id, u64 flags, vm::ptr<sys_prx_start_stop_module_option_t> pOpt)
{
	sys_prx.warning("_sys_prx_stop_module(id=0x%x, flags=0x%x, pOpt=*0x%x)", id, flags, pOpt);

	const auto prx = idm::get<lv2_obj, lv2_prx>(id);

	if (!prx)
	{
		return CELL_ESRCH;
	}

	//if (!prx->is_started)
	//	return CELL_PRX_ERROR_ALREADY_STOPPED;

	//prx->is_started = false;
	pOpt->entry.set(prx->stop ? prx->stop.addr() : ~0ull);

	return CELL_OK;
}
开发者ID:rcaridade145,项目名称:rpcs3,代码行数:19,代码来源:sys_prx.cpp

示例9: sys_get_random_number

s32 sys_get_random_number(vm::ptr<void> addr, u64 size)
{
	sysPrxForUser.warning("sys_get_random_number(addr=*0x%x, size=%d)", addr, size);

	if (size > 0x1000)
	{
		return CELL_EINVAL;
	}

	switch (u32 rs = sys_ss_random_number_generator(2, addr, size))
	{
	case 0x80010501: return CELL_ENOMEM;
	case 0x80010503: return CELL_EAGAIN;
	case 0x80010509: return CELL_EINVAL;
	default: if (rs) return CELL_EABORT;
	}

	return CELL_OK;
}
开发者ID:DHrpcs3,项目名称:rpcs3,代码行数:19,代码来源:sysPrxForUser.cpp

示例10: sys_spu_image_close

s32 sys_spu_image_close(vm::ptr<sys_spu_image_t> img)
{
	sysPrxForUser.warning("sys_spu_image_close(img=*0x%x)", img);

	if (img->type == SYS_SPU_IMAGE_TYPE_USER)
	{
		//_sys_free(img->segs.addr());
	}
	else if (img->type == SYS_SPU_IMAGE_TYPE_KERNEL)
	{
		//return syscall_158(img);
	}
	else
	{
		return CELL_EINVAL;
	}

	VERIFY(vm::dealloc(img->segs.addr(), vm::main)); // Current rough implementation
	return CELL_OK;
}
开发者ID:4iDragon,项目名称:rpcs3,代码行数:20,代码来源:sys_spu_.cpp

示例11: sys_timer_get_information

s32 sys_timer_get_information(u32 timer_id, vm::ptr<sys_timer_information_t> info)
{
	sys_timer.warning("sys_timer_get_information(timer_id=0x%x, info=*0x%x)", timer_id, info);

	LV2_LOCK;

	const auto timer = idm::get<lv2_timer_t>(timer_id);

	if (!timer)
	{
		return CELL_ESRCH;
	}

	info->next_expiration_time = timer->expire;

	info->period      = timer->period;
	info->timer_state = timer->state;

	return CELL_OK;
}
开发者ID:4iDragon,项目名称:rpcs3,代码行数:20,代码来源:sys_timer.cpp

示例12: sys_memory_container_get_size

error_code sys_memory_container_get_size(vm::ptr<sys_memory_info_t> mem_info, u32 cid)
{
	sys_memory.warning("sys_memory_container_get_size(mem_info=*0x%x, cid=0x%x)", mem_info, cid);

	const auto ct = idm::get<lv2_memory_container>(cid);

	if (!ct)
	{
		return CELL_ESRCH;
	}

	mem_info->total_user_memory = ct->size; // Total container memory
	// Available container memory, minus a hidden 'buffer' 
	// This buffer seems to be used by the PS3 OS for c style 'mallocs'
	// Todo: Research this more, even though we dont use this buffer, it helps out games when calculating 
	//	     expected memory they can use allowing them to boot
	mem_info->available_user_memory = ct->size - ct->used - 0x1000000; 

	return CELL_OK;
}
开发者ID:yiweigang,项目名称:rpcs3,代码行数:20,代码来源:sys_memory.cpp

示例13: cellSysmoduleLoadModule

s32 cellSysmoduleLoadModule(u16 id)
{
	cellSysmodule.warning("cellSysmoduleLoadModule(id=%s)", get_module_id(id));

	const auto name = get_module_name(id);

	if (!name)
	{
		cellSysmodule.error("cellSysmoduleLoadModule() failed: unknown module 0x%04X", id);
		return CELL_SYSMODULE_ERROR_UNKNOWN;
	}

	//if (Module<>* m = Emu.GetModuleManager().GetModuleById(id))
	//{
	//	// CELL_SYSMODULE_ERROR_DUPLICATED shouldn't be returned
	//	m->Load();
	//}

	return CELL_OK;
}
开发者ID:DHrpcs3,项目名称:rpcs3,代码行数:20,代码来源:cellSysmodule.cpp

示例14: sys_spu_thread_group_create

s32 sys_spu_thread_group_create(vm::ptr<u32> id, u32 num, s32 prio, vm::ptr<sys_spu_thread_group_attribute> attr)
{
	sys_spu.warning("sys_spu_thread_group_create(id=*0x%x, num=%d, prio=%d, attr=*0x%x)", id, num, prio, attr);

	// TODO: max num value should be affected by sys_spu_initialize() settings

	if (!num || num > 6 || prio < 16 || prio > 255)
	{
		return CELL_EINVAL;
	}

	if (attr->type)
	{
		sys_spu.todo("Unsupported SPU Thread Group type (0x%x)", attr->type);
	}

	*id = idm::make<lv2_spu_group_t>(std::string{ attr->name.get_ptr(), attr->nsize - 1 }, num, prio, attr->type, attr->ct);

	return CELL_OK;
}
开发者ID:DreadIsBack,项目名称:rpcs3,代码行数:20,代码来源:sys_spu.cpp

示例15: sceNpInit

s32 sceNpInit(u32 poolsize, vm::ptr<void> poolptr)
{
	sceNp.warning("sceNpInit(poolsize=0x%x, poolptr=*0x%x)", poolsize, poolptr);

	if (poolsize == 0)
	{
		return SCE_NP_ERROR_INVALID_ARGUMENT;
	}
	else if (poolsize < 128 * 1024)
	{
		return SCE_NP_ERROR_INSUFFICIENT_BUFFER;
	}

	if (!poolptr)
	{
		return SCE_NP_ERROR_INVALID_ARGUMENT;
	}

	return CELL_OK;
}
开发者ID:4iDragon,项目名称:rpcs3,代码行数:20,代码来源:sceNp.cpp


注:本文中的logs::channel::warning方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。