File tree Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Expand file tree Collapse file tree 2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ # CON36-C: Wrap functions that can spuriously wake up in a loop
2+
3+ This query implements the CERT-C rule CON36-C:
4+
5+ > Wrap functions that can spuriously wake up in a loop
6+
7+
8+ ## CERT
9+
10+ ** REPLACE THIS BY RUNNING THE SCRIPT ` scripts/help/cert-help-extraction.py ` **
11+
12+ ## Implementation notes
13+
14+ None
15+
16+ ## References
17+
18+ * CERT-C: [ CON36-C: Wrap functions that can spuriously wake up in a loop] ( https://wiki.sei.cmu.edu/confluence/display/c )
Original file line number Diff line number Diff line change 1+ /**
2+ * @id c/cert/wrap-functions-that-can-spuriously-wake-up-in-loop
3+ * @name CON36-C: Wrap functions that can spuriously wake up in a loop
4+ * @description Not wrapping functions that can wake up spuriously in a conditioned loop can result
5+ * race conditions.
6+ * @kind problem
7+ * @precision very-high
8+ * @problem.severity error
9+ * @tags external/cert/id/con36-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.wrapspuriousfunctioninloop.WrapSpuriousFunctionInLoop
18+
19+ class WrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery extends WrapSpuriousFunctionInLoopSharedQuery {
20+ WrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery ( ) {
21+ this = Concurrency2Package:: wrapFunctionsThatCanSpuriouslyWakeUpInLoopQuery ( )
22+ }
23+ }
You can’t perform that action at this time.
0 commit comments