Skip to content

Commit 66c3e69

Browse files
authored
fix acrolinx errors by rewriting in active voice
1 parent 40e13d2 commit 66c3e69

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/code-quality/c26132.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ ms.date: 02/11/2025
1111

1212
> Variable '*variable name*' should be protected by '*lock 1*', but '*lock 2*' is held instead. Possible annotation mismatch.
1313
14-
Warning C26132 is issued when the analyzer detects that the lock that is annotated to protect a value is not held when the value is accessed. However, another lock that appears to be related is held. It is possible the code is thread safe, and the annotations need to be updated.
14+
The analyzer issues Warning C26132 when it detects that a lock, which is annotated to protect a value, isn't held while accessing the value. However, a related lock is held. The code may be thread-safe, so you might need to update the annotations.
1515

1616
## Examples
1717

1818
In the following example, C26132 is emitted when `data` is used.
1919

20-
The variable `data` is annotated to be protected by `customLock01`, but the locking function `CustomLockAcquire` is annotated to acquire the related lock `customLock01->cs`.
20+
The annotation specifies that `customLock01` should protect the variable `data`, but `CustomLockAcquire` is responsible for acquiring the related lock `customLock01->cs`.
2121

2222
```cpp
2323
#include <sal.h>
@@ -43,7 +43,7 @@ void Initialize(_Guarded_by_(customLock01) int* data)
4343
}
4444
```
4545
46-
In this example, the `Initialize` function is thread-safe and behaves as designed, but that design is not correctly reflected in the concurrency SAL annotations. This is fixed by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. This could also be fixed by changing the `_Guarded_by_` annotation from `customLock01` to `customLock01.cs`.
46+
In this example, the `Initialize` function is thread-safe and behaves as designed, but that design isn't correctly reflected in the concurrency SAL annotations. Fix by adjusting the annotations on the custom locking functions to use `criticalSection` rather than `criticalSection->cs`. This could also be fixed by changing the `_Guarded_by_` annotation from `customLock01` to `customLock01.cs`.
4747
4848
```cpp
4949
#include <sal.h>

0 commit comments

Comments
 (0)