How do you ensure no race condition occurs?

In reply to Reuben:

It would help if you could explain how sigs.sentMon.sent_sdin is defined and how it changes value.