Skip to content

Update to RTOS page and Kernel namespace documentation #606

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

Merged
merged 6 commits into from
Aug 1, 2018

Conversation

SenRamakri
Copy link
Contributor

This PR contains following docs changes:

  1. Added Kernel page
  2. Updated RTOS page

@SenRamakri
Copy link
Contributor Author

@AnotherButler - Can you please add you, @sg- , @kegilbert as reviewers for this PR?

@AnotherButler
Copy link
Contributor

Please complete the JIRA task by doing the following:

  • Remove all references to CMSIS-RTOS both on this page and throughout this folder.
  • Remove all reference to RTX both on this page and throughout this folder.
  • Ensure the error codes on this page are included in the Doxygen, and then delete them here.
  • Include RTOS design patterns and use cases.
  • Include two Mbed OS shared queues.

@SenRamakri
Copy link
Contributor Author

@AnotherButler - Mbed OS shared queue is captured in https://os.mbed.com/docs/v5.9/reference/eventqueue.html
I don't think the shared queue example belongs in top-level RTOS page.

Also, can you please clarify on what it means by "Include RTOS design patterns and use cases."

@AnotherButler
Copy link
Contributor

What are some general best practices or typical code patterns developers use when using these APIs? At a high level, when do developers use RTOS APIs? When don't they?

@SenRamakri
Copy link
Contributor Author

@AnotherButler - I think we can possibly include that, I got confused by design pattern as it can mean using these on some software design perspective.

@SenRamakri
Copy link
Contributor Author

@AnotherButler - I looked into this more. As of now, the RTOS page does have section "RTOS APIs" which lists all the objects under RTOS layer. And each of those takes the user to specific page explaining that object. And for each of those objects we have APIs examples/code snippets as required. The one which was missing before was Kernel APIs and I have added them as well. Please review if its not what you are looking for.

The Kernel namespace implements functions to read RTOS information. It implements one function to read the current RTOS kernel millisecond tick count.

### Kernel namespace reference

Copy link
Contributor

Choose a reason for hiding this comment

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

Note: This link doesn't work for me. Is there a code dependency?

Copy link
Contributor

@kegilbert kegilbert left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -1,14 +1,16 @@
<h2 id="rtos-api">RTOS overview</h2>

The Arm Mbed RTOS is a C++ wrapper over the Keil RTX code. For more information about Keil RTX, check [the Keil CMSIS-RTOS tutorial](https://github.com/ARM-software/CMSIS/raw/master/CMSIS/Documentation/RTX/CMSIS_RTOS_Tutorial.pdf) and [the element14 introduction to Keil RTX](https://www.element14.com/community/docs/DOC-46650/l/arm-keil-rtx-real-time-operating-system-overview). You can use these resources as a general introduction to RTOS principles; it is important to be familiar with the concepts behind an RTOS in order to understand this guide.
Arm Mbed OS provides C++ APIs to manage RTOS objects such as thread, synchronization objects and timer. It also provides interfaces for attaching an application-specific idle hook function and to read the tick count from OS. The Arm Mbed RTOS layer also handles RTOS errors and reports them into the Mbed OS error handling system.
Copy link
Contributor

Choose a reason for hiding this comment

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

Arm Mbed OS provides C++ APIs to manage

is the same as saying The Arm Mbed RTOS is a C++ wrapper over the Keil RTX code just in a different way. How about something like along the lines of the mbed os rtos capabilities include things such as ...

@@ -23,6 +25,8 @@ The RTOS APIs handle creation and destruction of threads in Arm Mbed OS 5, as we
- [RtosTimer](/docs/development/reference/rtostimer.html): A deprecated class used to control timer functions in the system.
- [EventFlags](/docs/development/reference/eventflags.html): An event channel that provides a generic way of notifying other threads about conditions or events.
- [Event](/docs/development/reference/event.html): The queue to store events, extract them and excute them later.
- [ConditionVariable](/docs/development/reference/conditionvariable.html): The ConditionVariable class provides a mechanism to safely wait for or signal state changes.
Copy link
Contributor

Choose a reason for hiding this comment

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

this sounds similar to how event flag is defined. How is it different?

- `osErrorOS`: unspecified RTOS error - runtime error but no other error message fits.
##### Status and Error codes

The Arm Mbed RTOS layer handles RTOS errors and report them using the Mbed OS error handling system. Please see the list of error codes in the [error handling](/docs/development/reference/error-handling.html) documentation for more information on RTOS errors reported.
Copy link
Contributor

Choose a reason for hiding this comment

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

dont describe layers, The RTOS errors codes are documented as part of OS errors...

@SenRamakri
Copy link
Contributor Author

@sg-, @kegilbert - Please review as I have updated with review comments.

@@ -1,14 +1,18 @@
<h2 id="rtos-api">RTOS overview</h2>

The Arm Mbed RTOS is a C++ wrapper over the Keil RTX code. For more information about Keil RTX, check [the Keil CMSIS-RTOS tutorial](https://github.com/ARM-software/CMSIS/raw/master/CMSIS/Documentation/RTX/CMSIS_RTOS_Tutorial.pdf) and [the element14 introduction to Keil RTX](https://www.element14.com/community/docs/DOC-46650/l/arm-keil-rtx-real-time-operating-system-overview). You can use these resources as a general introduction to RTOS principles; it is important to be familiar with the concepts behind an RTOS in order to understand this guide.
Mbed-OS RTOS provide C++ APIs to manage objects like thread, synchronization objects and timer. It also provides interfaces for attaching application
Copy link
Contributor

Choose a reason for hiding this comment

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

Minor nit:
Change to "The Mbed OS RTOS provides C++ APIs to manage objects like threads, synchronization objects, and timers."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@kegilbert - Change done, please review.

Amanda Butler added 2 commits July 27, 2018 14:18
Copy edit file for consistent style across documents.
Copy edit file for minor grammar nits, such as sentence case in headings and precise language.
@AnotherButler
Copy link
Contributor

@sg- It looks like @SenRamakri has addressed your comments. We'll go ahead and merge unless you have further improvements.

Update phrasing as requested.
@AnotherButler AnotherButler merged commit 7e1a5b1 into ARMmbed:development Aug 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants