specu: add process lock for IO accesses

To implement speculation, we need a way to control that two or more IOs
isn't executed at the same time.