bool withdrawal(struct account* acct, int amt) { if (acct->bal < amt) { return false; pthread_mutex_lock(&acct->mutex); if (acct->bal < amt) { pthread_mutex_unlock(&acct->mutex); return false; } acct->bal -= amt; pthread_mutex_unlock(&acct->mutex); return true; }