Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fc08df9

Browse filesBrowse files
committed
help formatting
1 parent b9639e5 commit fc08df9
Copy full SHA for fc08df9

File tree

2 files changed

+0
-2
lines changed
Filter options

2 files changed

+0
-2
lines changed

‎c/cert/src/rules/CON39-C/ThreadWasPreviouslyJoinedOrDetached.md

Copy file name to clipboardExpand all lines: c/cert/src/rules/CON39-C/ThreadWasPreviouslyJoinedOrDetached.md
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This query implements the CERT-C rule CON39-C:
55
> Do not join or detach a thread that was previously joined or detached
66
77

8-
98
## Description
109

1110
The C Standard, 7.26.5.6 \[[ISO/IEC 9899:2011](https://wiki.sei.cmu.edu/confluence/display/c/AA.+Bibliography#AA.Bibliography-ISO-IEC9899-2011)\], states that a thread shall not be joined once it was previously joined or detached. Similarly, subclause 7.26.5.3 states that a thread shall not be detached once it was previously joined or detached. Violating either of these subclauses results in [undefined behavior](https://wiki.sei.cmu.edu/confluence/display/c/BB.+Definitions#BB.Definitions-undefinedbehavior).

‎c/cert/src/rules/CON40-C/AtomicVariableTwiceInExpression.md

Copy file name to clipboardExpand all lines: c/cert/src/rules/CON40-C/AtomicVariableTwiceInExpression.md
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ This query implements the CERT-C rule CON40-C:
55
> Do not refer to an atomic variable twice in an expression
66
77

8-
98
## Description
109

1110
A consistent locking policy guarantees that multiple threads cannot simultaneously access or modify shared data. Atomic variables eliminate the need for locks by guaranteeing thread safety when certain operations are performed on them. The thread-safe operations on atomic variables are specified in the C Standard, subclauses 7.17.7 and 7.17.8 \[[ISO/IEC 9899:2011](https://wiki.sei.cmu.edu/confluence/display/c/AA.+Bibliography#AA.Bibliography-ISO%2FIEC9899-2011)\]. While atomic operations can be combined, combined operations do not provide the thread safety provided by individual atomic operations.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.