[FIX] Fix the event re-entrance for demos using dualprocshm

This should avoid the pre-emption of event handler caused by the
timer interrupt which results in re-entrance on event handler.