Get exclusive lock on serial ports.

Signed-off-by: Paul Brook <paul@nowt.org>