[PATCH 1/4 (updated)] ps3fb: thread updates

Christoph Hellwig hch at lst.de
Sat Feb 17 03:38:11 EST 2007


> +	DEFINE_WAIT(wait);
> +	DECLARE_WAIT_QUEUE_HEAD(wq);
> +
> +	while (!kthread_should_stop()) {
> +		prepare_to_wait(&wq, &wait, TASK_INTERRUPTIBLE);
> +		if (!ps3fb.is_kicked)
> +			schedule();
> +		finish_wait(&wq, &wait);
> +		ps3fb.is_kicked = 0;
> +		ps3fb_sync(0);	/* single buffer */

should probably be just:

	while (!kthread_should_stop()) {
		ps3fb_sync(0);
		schedule();
	}

given that you don't need a waitqueue and a spurious wakeup here
seems harmless.
		



More information about the Linuxppc-dev mailing list