implement acquiring lock for read and write

change osprd_ioctl, acquiring with blocking