From: "audetto@tiscali.it" <audetto@tiscali.it>
To: video4linux-list@redhat.com
Subject: [PATCH] pwc: do not block in VIDIOC_DQBUF
Date: Sat, 5 Jul 2008 15:23:42 +0200 (CEST) [thread overview]
Message-ID: <25500277.1215264222465.JavaMail.root@ps10> (raw)
[-- Attachment #1: Type: text/plain, Size: 595 bytes --]
I think the ioctl VIDIOC_DQBUF in pwc does not follow the API spec.
It should not block if there are no buffers and the device has been
opened with O_NONBLOCK.
I am not sure the patch is 100% correct, since I do not understand it
completely.
Andrea
_________________________________________________________________
Tiscali Family: Adsl e Telefono senza limiti e senza scatto alla risposta. PER TE CON LO SCONTO DEL 25% FINO AL 2010. In più il software parental control Magic Desktop Basic è GRATIS! Attiva entro il 03/07/08. http://abbonati.tiscali.it/promo/tuttoincluso/
[-- Attachment #2: pwc.diff --]
[-- Type: application/octet-stream, Size: 622 bytes --]
diff -r 87aa6048e718 linux/drivers/media/video/pwc/pwc-v4l.c
--- a/linux/drivers/media/video/pwc/pwc-v4l.c Wed Jul 02 08:59:38 2008 -0300
+++ b/linux/drivers/media/video/pwc/pwc-v4l.c Sat Jul 05 14:14:03 2008 +0100
@@ -1134,6 +1134,13 @@
frameq is safe now.
*/
add_wait_queue(&pdev->frameq, &wait);
+
+ if ((pdev->full_frames == NULL) && (file->f_flags & O_NONBLOCK)) {
+ remove_wait_queue(&pdev->frameq, &wait);
+ set_current_state(TASK_RUNNING);
+ return -EAGAIN;
+ }
+
while (pdev->full_frames == NULL) {
if (pdev->error_status) {
remove_wait_queue(&pdev->frameq, &wait);
[-- Attachment #3: Type: text/plain, Size: 164 bytes --]
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list
next reply other threads:[~2008-07-05 13:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-05 13:23 audetto [this message]
2008-07-07 20:21 ` [PATCH] pwc: do not block in VIDIOC_DQBUF Andrea
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=25500277.1215264222465.JavaMail.root@ps10 \
--to=audetto@tiscali.it \
--cc=video4linux-list@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox