...
Code Block | ||
---|---|---|
| ||
#include <pthread.h> volatile int account_balance; pthread_mutex_t flag = PTHREAD_MUTEX_INITIALIZER; void debit(int amount) { pthread_mutex_lock(&flag); account_balance -= amount;//Inside critical section pthread_mutex_unlock(&flag); } |
Risk Assessment
Recommendation | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
POS40-C | Medium | Probable | Medium | P12 | L1 |
...