*参照元 [#p09fb70f] #backlinks *説明 [#r5f6b9f1] -パス: [[linux-4.4.1/drivers/media/usb/uvc/uvc_queue.c]] -FIXME: これは何? --説明 **引数 [#we5d6313] -struct vb2_buffer *vb -- --[[linux-4.4.1/vb2_buffer]] **返り値 [#s55d280a] -void **参考 [#k493f668] *実装 [#xf6322be] static void uvc_buffer_queue(struct vb2_buffer *vb) { struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); struct uvc_video_queue *queue = vb2_get_drv_priv(vb->vb2_queue); struct uvc_buffer *buf = container_of(vbuf, struct uvc_buffer, buf); unsigned long flags; - --[[linux-4.4.1/vb2_v4l2_buffer]] --[[linux-4.4.1/to_vb2_v4l2_buffer()]] --[[linux-4.4.1/uvc_video_queue()]] --[[linux-4.4.1/vb2_get_drv_priv()]] --[[linux-4.4.1/uvc_buffer]] --[[linux-4.4.1/container_of()]] --[[linux-4.4.1/uvc_buffer]] spin_lock_irqsave(&queue->irqlock, flags); if (likely(!(queue->flags & UVC_QUEUE_DISCONNECTED))) { list_add_tail(&buf->queue, &queue->irqqueue); } else { /* If the device is disconnected return the buffer to userspace * directly. The next QBUF call will fail with -ENODEV. */ buf->state = UVC_BUF_STATE_ERROR; vb2_buffer_done(vb, VB2_BUF_STATE_ERROR); } - --[[linux-4.4.1/spin_lock_irqsave()]] --[[linux-4.4.1/likely()]] --[[linux-4.4.1/list_add_tail()]] --[[linux-4.4.1/vb2_buffer_done()]] spin_unlock_irqrestore(&queue->irqlock, flags); - --[[linux-4.4.1/spin_unlock_irqrestore()]] } *コメント [#e1610bba]