Enforce exclusive access to the serial port.