For example, IDNestCnt and TDNestCnt have to be LONG since addq.b does not exist on CF and you cannot replace the addq.b by multiple instructions : the update of IDNestCnt and TDNestCnt must be done with one atomic instruction.
I used to think so, too, but then started to guess that they probably do not need to be atomic. The reason being that despite context switches (task - task, task - interrupt) they are saved/restored and so if a context is left and later returned to the IDNestCnt/TDNestCnt value is the same as it used to be when context was left.
They would need to be atomic if a context switch could cause a change of value.
context 1:
read idnestcnt to register
inc register
[context switch to something else]
[context switch back to here]
/* no problem, as idnestcnt is same as when context was left */
write register to idnestcnt