mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 10:46:25 +00:00
base: add check whether stack belongs to ep
Add method to check whether a given pointer are part of the primary stack of the rpc entrypoint. Issue #4540
This commit is contained in:
parent
fb0fe8617c
commit
c81b3d4757
@ -481,6 +481,17 @@ class Genode::Rpc_entrypoint : Thread, public Object_pool<Rpc_object_base>
|
||||
* This method is solely needed on Linux.
|
||||
*/
|
||||
bool is_myself() const;
|
||||
|
||||
/**
|
||||
* Check whether given stack info matches stack of the entrypoint.
|
||||
*
|
||||
* \noapi
|
||||
*
|
||||
*/
|
||||
bool myself(addr_t const ptr) const
|
||||
{
|
||||
return addr_t(stack_base()) <= ptr && ptr <= addr_t(stack_top());
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user