How can I correctly setup attachInterrupt() in this sketch?

The word "critical" appear three times on the page referenced, the last time in a bold section header labelled "Critical sections ... accessing volatile variables"