In case of using multiple message with list,
wake up interrupt should call after all messages are added to list.
Otherwise, synchronization problem can be occurred.
Change-Id: I808f54d8d08267e8038e6fe17187abaaa10edf56
Signed-off-by: Munkyu Im <munkyu.im@samsung.com>
(cherry picked from commit
28efc5cf7353c64fb3da97a3d51020769db86ba5)
struct msg_info* _msg;
struct msg_buf* msgbuf;
-
-
/* TODO : check if guest has been connected. */
_msg = (struct msg_info*) virtqueue_get_buf(vevdi->rvq, &len);
spin_unlock_irqrestore(&pevdi_info[EVID_READ]->inbuf_lock, flags);
- wake_up_interruptible(&pevdi_info[EVID_READ]->waitqueue);
-
_msg = (struct msg_info*) virtqueue_get_buf(vevdi->rvq, &len);
if (_msg == NULL) {
break;
} while (true);
+ wake_up_interruptible(&pevdi_info[EVID_READ]->waitqueue);
/*
if (add_inbuf(vevdi->rvq, &vevdi->read_msginfo) < 0)
spin_unlock_irqrestore(&pnfc_info[NFC_READ]->inbuf_lock, flags);
- wake_up_interruptible(&pnfc_info[NFC_READ]->waitqueue);
-
msg = (unsigned char*) virtqueue_get_buf(vnfc->rvq, &len);
if (msg == NULL) {
break;
}
} while (true);
+
+ wake_up_interruptible(&pnfc_info[NFC_READ]->waitqueue);
/*
if (add_inbuf(vnfc->rvq, &vnfc->readmsginfo) < 0)
{
spin_unlock_irqrestore(&pvmodem_info[EVID_READ]->inbuf_lock, flags);
- wake_up_interruptible(&pvmodem_info[EVID_READ]->waitqueue);
-
_msg = (struct msg_info*) virtqueue_get_buf(vvmodem->rvq, &len);
if (_msg == NULL) {
break;
}
} while (true);
+
+ wake_up_interruptible(&pvmodem_info[EVID_READ]->waitqueue);
}
static void vmodem_send_done(struct virtqueue *svq) {