...
This compliant solution performs a postcondition test to ensure that the result of the unsigned addition operation to i
is not less than the operand ui1
.
Code Block |
---|
atomic_int i; int ui1; /* Initialize ui1, i */ atomic_fetch_add(&i, ui1); if (atomic_load(&i) < ui1) { /* handle error condition */ } |
Exceptions
...