Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refine code comments: clarify misleading names and comments for thread_rpc_alloc_*_payload APIs #7096

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions core/include/kernel/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,8 @@ bool thread_is_in_normal_mode(void);
bool thread_is_from_abort_mode(void);

/**
* Allocates data for payload buffers.
* Allocates data for payload buffers only shared with user space applications.
* Ensure consistency with the enumeration `THREAD_SHM_TYPE_APPLICATION`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That not entirely true: only is misleading. Maybe prefer Allocate data for payload buffers shared with a non-secure user space application.

Prefer drop the back quotes around THREAD_SHM_TYPE_APPLICATION.

*
* @size: size in bytes of payload buffer
*
Expand All @@ -260,7 +261,8 @@ struct mobj *thread_rpc_alloc_payload(size_t size);
void thread_rpc_free_payload(struct mobj *mobj);

/**
* Allocate data for payload buffers only shared with the non-secure kernel
* Allocate data for payload buffers only shared with the non-secure kernel.
* Ensure consistency with the enumeration `THREAD_SHM_TYPE_KERNEL_PRIVATE`.
*
* @size: size in bytes of payload buffer
*
Expand Down Expand Up @@ -333,8 +335,8 @@ uint32_t thread_rpc_cmd(uint32_t cmd, size_t num_params,
struct thread_param *params);

/**
* Allocate data for payload buffers.
* Buffer is exported to user mode applications.
* Allocate data for payload buffers shared with both user space applications the non-secure kernel.
* Ensure consistency with the enumeration `THREAD_SHM_TYPE_GLOBAL`.
*
* @size: size in bytes of payload buffer
*
Expand Down