本文整理汇总了C++中vm::ptr::get_ptr方法的典型用法代码示例。如果您正苦于以下问题:C++ ptr::get_ptr方法的具体用法?C++ ptr::get_ptr怎么用?C++ ptr::get_ptr使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vm::ptr
的用法示例。
在下文中一共展示了ptr::get_ptr方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: send
s32 send(s32 s, vm::ptr<const char> buf, u32 len, s32 flags)
{
sys_net.Warning("send(s=%d, buf_addr=0x%x, len=%d, flags=0x%x)", s, buf.addr(), len, flags);
int ret = ::send(s, buf.get_ptr(), len, flags);
*g_lastError = getLastError();
return ret;
}
示例2: setsockopt
s32 setsockopt(s32 s, s32 level, s32 optname, vm::ptr<const char> optval, u32 optlen)
{
sys_net.Warning("socket(s=%d, level=%d, optname=%d, optval_addr=0x%x, optlen=%d)", s, level, optname, optval.addr(), optlen);
int ret = ::setsockopt(s, level, optname, optval.get_ptr(), optlen);
*g_lastError = getLastError();
return ret;
}
示例3: console_write
s32 console_write(vm::ptr<char> data, u32 len)
{
sysPrxForUser.Warning("console_write(data=*0x%x, len=%d)", data, len);
LOG_NOTICE(TTY, { data.get_ptr(), len });
return CELL_OK;
}
示例4:
vm::ptr<void> _sys_memcpy(vm::ptr<void> dst, vm::cptr<void> src, u32 size)
{
sysPrxForUser.Log("_sys_memcpy(dst=*0x%x, src=*0x%x, size=0x%x)", dst, src, size);
memcpy(dst.get_ptr(), src.get_ptr(), size);
return dst;
}
示例5: cellFsRmdir
s32 cellFsRmdir(vm::ptr<const char> path)
{
sys_fs->Warning("cellFsRmdir(path=\"%s\")", path.get_ptr());
LV2_LOCK(0);
std::string _path = path.get_ptr();
vfsDir d;
if (!d.IsExists(_path))
return CELL_ENOENT;
if (!d.Remove(_path))
return CELL_EBUSY;
return CELL_OK;
}
示例6: _sys_printf
s32 _sys_printf(vm::ptr<const char> fmt)
{
sysPrxForUser->Todo("_sys_printf(fmt_addr=0x%x, ...)", fmt.addr());
// probably, assertion failed
sysPrxForUser->Warning("_sys_printf: \n%s", fmt.get_ptr());
return CELL_OK;
}
示例7:
vm::ptr<void> _sys_memset(vm::ptr<void> dst, s32 value, u32 size)
{
sysPrxForUser.trace("_sys_memset(dst=*0x%x, value=%d, size=0x%x)", dst, value, size);
std::memset(dst.get_ptr(), value, size);
return dst;
}
示例8: sprintf
void sprintf(ARMv7Thread& cpu, vm::ptr<char> str, vm::cptr<char> fmt, arm_va_args_t va_args)
{
sceLibc.warning("sprintf(str=*0x%x, fmt=%s, ...)", str, fmt);
const std::string& result = arm_fmt(cpu, fmt, va_args.count);
sceLibc.trace("sprintf() -> '%s'", result);
::memcpy(str.get_ptr(), result.c_str(), result.size() + 1);
}
示例9: _sys_printf
s32 _sys_printf(vm::ptr<const char> fmt) // va_args...
{
sysPrxForUser.Todo("_sys_printf(fmt=*0x%x, ...)", fmt);
// probably, assertion failed
sysPrxForUser.Fatal("_sys_printf: \n%s", fmt.get_ptr());
Emu.Pause();
return CELL_OK;
}
示例10: cellFsUnlink
s32 cellFsUnlink(vm::ptr<const char> path)
{
sys_fs->Warning("cellFsUnlink(path=\"%s\")", path.get_ptr());
LV2_LOCK(0);
std::string _path = path.get_ptr();
if (vfsDir().IsExists(_path))
return CELL_EISDIR;
if (!Emu.GetVFS().ExistsFile(_path))
return CELL_ENOENT;
if (!Emu.GetVFS().RemoveFile(_path))
return CELL_EACCES;
return CELL_OK;
}
示例11: cellFsChmod
s32 cellFsChmod(vm::ptr<const char> path, u32 mode)
{
sys_fs->Todo("cellFsChmod(path=\"%s\", mode=0x%x)", path.get_ptr(), mode);
LV2_LOCK(0);
// TODO:
return CELL_OK;
}
示例12: recv
s32 recv(s32 s, vm::ptr<char> buf, u32 len, s32 flags)
{
libnet.warning("recv(s=%d, buf=*0x%x, len=%d, flags=0x%x)", s, buf, len, flags);
s = g_socketMap[s];
s32 ret = ::recv(s, buf.get_ptr(), len, flags);
get_errno() = getLastError();
return ret;
}
示例13: sprintf
void sprintf(ARMv7Thread& context, vm::ptr<char> str, vm::cptr<char> fmt, armv7_va_args_t va_args)
{
sceLibc.warning("sprintf(str=*0x%x, fmt=*0x%x)", str, fmt);
sceLibc.trace("*** *fmt = '%s'", fmt.get_ptr());
const std::string& result = armv7_fmt(context, fmt, va_args.g_count, va_args.f_count, va_args.v_count);
sceLibc.trace("*** -> '%s'", result);
::memcpy(str.get_ptr(), result.c_str(), result.size() + 1);
}
示例14: _sys_sprintf
s32 _sys_sprintf(ppu_thread& ppu, vm::ptr<char> buffer, vm::cptr<char> fmt, ppu_va_args_t va_args)
{
sysPrxForUser.warning("_sys_sprintf(buffer=*0x%x, fmt=%s, ...)", buffer, fmt);
std::string result = ps3_fmt(ppu, fmt, va_args.count);
std::memcpy(buffer.get_ptr(), result.c_str(), result.size() + 1);
return static_cast<s32>(result.size());
}
示例15: sys_fs_truncate
s32 sys_fs_truncate(vm::ptr<const char> path, u64 size)
{
sys_fs.Warning("sys_fs_truncate(path=*0x%x, size=0x%llx)", path, size);
sys_fs.Warning("*** path = '%s'", path.get_ptr());
std::string ps3_path = path.get_ptr();
if (!Emu.GetVFS().ExistsFile(ps3_path))
{
return CELL_FS_ENOENT;
}
if (!Emu.GetVFS().TruncateFile(ps3_path, size))
{
return CELL_FS_EIO; // ???
}
return CELL_OK;
}