Skip to content

Commit 72310c3

Browse files
author
Amanda Butler
authored
Copy edit CriticalSectionLock.md
Make minor copy edits.
1 parent 8bead55 commit 72310c3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/reference/api/platform/CriticalSectionLock.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
## CriticalSectionLock
22

3-
CriticalSectionLock class provides a mechanism to access a resource without interruption. With the `lock` API, you can enter critical section with interrupts disabled. The `unlock` API is the exit from critical section, and the state of interrupts is restored upon exit. Nesting of critical section is supported, and interrupts are enabled only when we exit from last nested critical section.
3+
The CriticalSectionLock class provides a mechanism to access a resource without interruption. With the `lock` API, you can enter critical section with interrupts disabled. The `unlock` API is the exit from critical section, and the state of interrupts is restored upon exit. Nesting of critical section is supported, and interrupts are enabled only when we exit from last nested critical section.
44

5-
CriticalSectionLock class is based on RAII approach i.e. lock is acquired in constructor and destroyed automatically when out of scope as part of destructor. Usage of CriticalSectionLock as global or member of class is not recommended, as you will enter critical section on object creation and all interrupts will be disabled.
5+
CriticalSectionLock class is based on RAII approach. In other words, lock is acquired in constructor and destroyed automatically when out of scope as part of destructor. 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.
66

7-
8-
<span class="notes">**Note:** You must not use time consuming operations, standard library and RTOS functions inside critical section.</span>
7+
<span class="notes">**Note:** You must not use time-consuming operations, standard library and RTOS functions inside critical section.</span>
98

109
## CriticalSectionLock class reference
1110

0 commit comments

Comments
 (0)