int register = sharedState; // load
register = register + 1; // add
sharedState = register; // store