Skip to content

Commit e848088

Browse files
authored
acrolinx
1 parent 66c3e69 commit e848088

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/code-quality/c26133.md

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

1212
> Caller failing to hold lock '*lock 1*' before calling function '*function name*', but '*lock 2*' is held instead. Possible annotation mismatch.
1313
14-
Warning C26133 is issued when the analyzer detects that the lock that is required to call a function isn't held when the function is called. 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+
Warning C26133 is issued when the analyzer detects that the lock required to call a function isn't held when the function is called. However, another lock that appears to be related is held. It's possible the code is thread-safe, and the annotations need to be updated.
1515

1616
## Examples
1717

@@ -45,7 +45,7 @@ void DoTask()
4545
}
4646
```
4747
48-
In this example, the `DoTask` 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 `_Requires_lock_held_` annotation from `customLock01` to `customLock01.cs`.
48+
In this example, the `DoTask` 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 `_Requires_lock_held_` annotation from `customLock01` to `customLock01.cs`.
4949
5050
```cpp
5151
#include <sal.h>

0 commit comments

Comments
 (0)