kernel: remove k_object_access_revoke() as syscall
Forthcoming patches will dual-purpose an object's permission bitfield as also reference tracking for kernel objects, used to handle automatic freeing of resources. We do not want to allow user thread A to revoke thread B's access to some object O if B is in the middle of an API call using O. However we do want to allow threads to revoke their own access to an object, so introduce a new API and syscall for that. Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This commit is contained in:
parent
a2480bd472
commit
e9cfc54d00
7 changed files with 33 additions and 46 deletions
|
@ -223,13 +223,21 @@ static inline void _impl_k_object_access_grant(void *object,
|
|||
/**
|
||||
* @internal
|
||||
*/
|
||||
static inline void _impl_k_object_access_revoke(void *object,
|
||||
struct k_thread *thread)
|
||||
static inline void k_object_access_revoke(void *object,
|
||||
struct k_thread *thread)
|
||||
{
|
||||
ARG_UNUSED(object);
|
||||
ARG_UNUSED(thread);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
static inline void _impl_k_object_release(void *object)
|
||||
{
|
||||
ARG_UNUSED(object);
|
||||
}
|
||||
|
||||
static inline void k_object_access_all_grant(void *object)
|
||||
{
|
||||
ARG_UNUSED(object);
|
||||
|
@ -258,7 +266,10 @@ __syscall void k_object_access_grant(void *object, struct k_thread *thread);
|
|||
* @param object Address of kernel object
|
||||
* @param thread Thread to remove access to the object
|
||||
*/
|
||||
__syscall void k_object_access_revoke(void *object, struct k_thread *thread);
|
||||
void k_object_access_revoke(void *object, struct k_thread *thread);
|
||||
|
||||
|
||||
__syscall void k_object_release(void *object);
|
||||
|
||||
/**
|
||||
* grant all present and future threads access to an object
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue