Skip to content

Conversation

aashishc1988
Copy link
Contributor

Description

Improve documentation for mutex

[ ] Fix
[x ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Breaking change

@aashishc1988
Copy link
Contributor Author

@AnotherButler

rtos/Mutex.h Outdated
@return status code that indicates the execution status of the function:
@a osOK the mutex has been obtained.
@a Status code like osOK indicates that the mutex has been obtained.
Copy link
Contributor

Choose a reason for hiding this comment

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

"Like" means similar to but not including. "Such as" means similar to and including. So if osOK is a status code that indicates that the mutex has been obtained, please change "like" to "such as". If osOK is similar to status code that indicates that the mutex has been obtained but isn't that, please leave as is.

rtos/Mutex.h Outdated
@return status code that indicates the execution status of the function:
@a osOK the mutex has been released.
@a Status code like osOK indicates that the mutex has been released.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please see earlier comment.

@aashishc1988
Copy link
Contributor Author

Modified

rtos/Mutex.h Outdated
@return status code that indicates the execution status of the function:
@a osOK the mutex has been obtained.
@a Status code such as osOK indicates that the mutex has been obtained.
Copy link
Contributor

Choose a reason for hiding this comment

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

No, the only thing this can return is osOK. See the note below. Same for the other function

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed

aashishc1988 and others added 2 commits October 12, 2018 10:51
Make minor copy edits to existing text.
@cmonr cmonr merged commit bbc6e5d into ARMmbed:master Oct 13, 2018
@note
Memory considerations: The mutex control structures will be created on current thread's stack, both for the Mbed OS
Memory considerations: The mutex control structures are created on the current thread's stack, both for the Mbed OS
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't have noticed this note apart from the edit, but it's false.

The RTOS mutex control structure is embedded in the Mutex object itself (rather than any RTOS memory pool), so the allocation is determined by where you allocate the Mutex. That could conceivably be on the stack, but not in any normal application.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry I was not in office for couple of days. We would need to file separate PR for it since this is already merged. @kjbracey-arm , would you please file a PR with the accurate description? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants