本文整理汇总了C++中Capability::rights方法的典型用法代码示例。如果您正苦于以下问题:C++ Capability::rights方法的具体用法?C++ Capability::rights怎么用?C++ Capability::rights使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Capability
的用法示例。
在下文中一共展示了Capability::rights方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
bool
Generic_obj_space<SPACE>::v_lookup(Addr const &virt, Phys_addr *phys = 0,
Size *size = 0, unsigned *attribs = 0)
{
if (size) size->set_value(1);
Entry *cap;
if (Optimize_local
&& mem_space() == Mem_space::current_mem_space(current_cpu()))
cap = cap_virt(virt.value());
else
cap = get_cap(virt.value());
if (EXPECT_FALSE(!cap))
{
if (size) size->set_value(Caps_per_page);
return false;
}
if (Optimize_local)
{
Capability c = Mem_layout::read_special_safe((Capability*)cap);
if (phys) *phys = c.obj();
if (c.valid() && attribs) *attribs = c.rights();
return c.valid();
}
else
{
Obj::set_entry(virt, cap);
if (phys) *phys = cap->obj();
if (cap->valid() && attribs) *attribs = cap->rights();
return cap->valid();
}
}
示例2:
Kobject_iface *
Obj_space_virt<SPACE>::lookup_local(Cap_index virt, L4_fpage::Rights *rights)
{
virt &= Cap_index(~(~0UL << Whole_space));
Capability *c = reinterpret_cast<Capability*>(cap_virt(virt));
Capability cap = Mem_layout::read_special_safe(c);
if (rights) *rights = L4_fpage::Rights(cap.rights());
return cap.obj();
}
示例3:
inline
Kobject_iface *
Generic_obj_space<SPACE>::lookup_local(Address virt, unsigned char *rights = 0)
{
Entry *c = get_cap(virt);
if (EXPECT_FALSE(!c))
return 0;
Capability cap = *c;
if (rights)
*rights = cap.rights();
return cap.obj();
}
示例4:
inline
Kobject_iface *
Obj_space_phys<SPACE>::lookup_local(Cap_index virt, L4_fpage::Rights *rights)
{
Entry *c = get_cap(virt);
if (EXPECT_FALSE(!c))
return 0;
Capability cap = *c;
if (rights)
*rights = L4_fpage::Rights(cap.rights());
return cap.obj();
}