Skip to content

CriticalSection Class Update (MERGE version - mbed-os-5.8) #370

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 2 commits into from
Jan 3, 2018
Merged

CriticalSection Class Update (MERGE version - mbed-os-5.8) #370

merged 2 commits into from
Jan 3, 2018

Conversation

deepikabhavnani
Copy link

CriticalSection Class was update and new member functions were added. See https://jira.arm.com/browse/IOTMORF-1773 and ARMmbed/mbed-os#5621 for more info.


CriticalSectionLock class is based on RAII approach. In other words, the constructor acquires the lock, and the destructor destroys it automatically when it is out of scope. We do not recommend you use CriticalSectionLock as global or a member of a class because you will enter critical section on object creation, and all interrupts will be disabled.

Nesting of critical section is supported, and the destructor enables interrupts only when you exit from the last nested critical section.
Copy link
Contributor

Choose a reason for hiding this comment

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

Query: Would it be correct to say "Mbed OS supports nesting of critical section, and the destructor..." for active voice?

Copy link
Author

Choose a reason for hiding this comment

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

Yes

Update sentence for active voice based on engineer feedback.
@AnotherButler AnotherButler requested a review from 0xc0170 January 2, 2018 21:31
@AnotherButler
Copy link
Contributor

@deepikabhavnani Is it OK if I merge this into new_engine for 5.8, as long as I don't merge it into 5.7? Or should I wait?

@deepikabhavnani
Copy link
Author

deepikabhavnani commented Jan 3, 2018

Yes. Thanks

@AnotherButler AnotherButler merged commit ae78858 into ARMmbed:new_engine Jan 3, 2018
@deepikabhavnani deepikabhavnani deleted the critical_lock branch January 3, 2018 21:28
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.

3 participants