Hi!
> due to the use of sleep_on in vicam.c there is a small window of a race that
> causes a neverending sleep. Fix is by going for standard waitqueues.
Looks good, Greg please apply.
Olivier, do you actually have vicam?
Pavel
> --- vicam.c.alt Thu Jan 31 21:04:38 2002
> +++ vicam.c Thu Jan 31 21:16:05 2002
> @@ -79,7 +79,7 @@
> static struct usb_driver vicam_driver;
>
> static char *buf, *buf2;
> -static int change_pending = 0;
> +static volatile int change_pending = 0;
>
> static int vicam_parameters(struct usb_vicam *vicam);
>
> @@ -330,8 +330,14 @@
>
> static void synchronize(struct usb_vicam *vicam)
> {
> + DECLARE_WAITQUEUE(wait, current);
> change_pending = 1;
> - interruptible_sleep_on(&vicam->wait);
> + set_current_state(TASK_INTERRUPTIBLE);
> + add_wait_queue(&vicam->wait, &wait);
> + if (change_pending)
> + schedule();
> + remove_wait_queue(&vicam->wait, &wait);
> + set_current_state(TASK_RUNNING);
> vicam_sndctrl(1, vicam, VICAM_REQ_CAMERA_POWER, 0x00, NULL, 0);
> mdelay(10);
> vicam_sndctrl(1, vicam, VICAM_REQ_LED_CONTROL, 0x00, NULL, 0);
>
--
(about SSSCA) "I don't say this lightly. However, I really think that the U.S.
no longer is classifiable as a democracy, but rather as a plutocracy." --hpa
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel