File tree Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Expand file tree Collapse file tree 2 files changed +39
-0
lines changed Original file line number Diff line number Diff line change
1
+ # CON38-C: Preserve thread safety and liveness when using condition variables
2
+
3
+ This query implements the CERT-C rule CON38-C:
4
+
5
+ > Preserve thread safety and liveness when using condition variables
6
+ ## CERT
7
+
8
+ ** REPLACE THIS BY RUNNING THE SCRIPT ` scripts/help/cert-help-extraction.py ` **
9
+
10
+ ## Implementation notes
11
+
12
+ None
13
+
14
+ ## References
15
+
16
+ * CERT-C: [ CON38-C: Preserve thread safety and liveness when using condition variables] ( https://wiki.sei.cmu.edu/confluence/display/c )
Original file line number Diff line number Diff line change
1
+ /**
2
+ * @id c/cert/preserve-safety-when-using-condition-variables
3
+ * @name CON38-C: Preserve thread safety and liveness when using condition variables
4
+ * @description Usages of `cnd_signal` with non-unique condition variables may impact thread safety
5
+ * and liveness.
6
+ * @kind problem
7
+ * @precision very-high
8
+ * @problem.severity error
9
+ * @tags external/cert/id/con38-c
10
+ * correctness
11
+ * concurrency
12
+ * external/cert/obligation/rule
13
+ */
14
+
15
+ import cpp
16
+ import codingstandards.c.cert
17
+ import codingstandards.cpp.rules.preservesafetywhenusingconditionvariables.PreserveSafetyWhenUsingConditionVariables
18
+
19
+ class PreserveSafetyWhenUsingConditionVariablesQuery extends PreserveSafetyWhenUsingConditionVariablesSharedQuery {
20
+ PreserveSafetyWhenUsingConditionVariablesQuery ( ) {
21
+ this = Concurrency3Package:: preserveSafetyWhenUsingConditionVariablesQuery ( )
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments