All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH 30/39] sound/vx_core: replace schedule_timeout() with
@ 2005-01-21 19:47 Nishanth Aravamudan
  2005-01-24 14:10   ` [KJ] Re: [Alsa-devel] [PATCH 30/39] sound/vx_core: replace Takashi Iwai
  0 siblings, 1 reply; 4+ messages in thread
From: Nishanth Aravamudan @ 2005-01-21 19:47 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 855 bytes --]

Hi,

Please consider applying.

Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The check for xmsec >= 1000 / HZ seems wrong to me, as well,
since if HZ==100, that means we could mdelay() for 9 msecs! msleep() should be
usable in all cases when not in an interrupt handler.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.11-rc1-kj-v/sound/drivers/vx/vx_core.c	2005-01-15 16:55:45.000000000 -0800
+++ 2.6.11-rc1-kj/sound/drivers/vx/vx_core.c	2005-01-18 13:26:06.000000000 -0800
@@ -45,9 +45,8 @@ MODULE_LICENSE("GPL");
  */
 void snd_vx_delay(vx_core_t *chip, int xmsec)
 {
-	if (! in_interrupt() && xmsec >= 1000 / HZ) {
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout((xmsec * HZ + 999) / 1000);
+	if (!in_interrupt()) {
+		msleep(xmsec);
 	} else {
 		mdelay(xmsec);
 	}

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [PATCH 30/39] sound/vx_core: replace schedule_timeout() with msleep()
@ 2005-01-21 19:47 Nishanth Aravamudan
  0 siblings, 0 replies; 4+ messages in thread
From: Nishanth Aravamudan @ 2005-01-21 19:47 UTC (permalink / raw)
  To: tiwai, perex; +Cc: alsa-devel, kernel-janitors

Hi,

Please consider applying.

Description: Use msleep() instead of schedule_timeout() to guarantee the task
delays as expected. The check for xmsec >= 1000 / HZ seems wrong to me, as well,
since if HZ==100, that means we could mdelay() for 9 msecs! msleep() should be
usable in all cases when not in an interrupt handler.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.11-rc1-kj-v/sound/drivers/vx/vx_core.c	2005-01-15 16:55:45.000000000 -0800
+++ 2.6.11-rc1-kj/sound/drivers/vx/vx_core.c	2005-01-18 13:26:06.000000000 -0800
@@ -45,9 +45,8 @@ MODULE_LICENSE("GPL");
  */
 void snd_vx_delay(vx_core_t *chip, int xmsec)
 {
-	if (! in_interrupt() && xmsec >= 1000 / HZ) {
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout((xmsec * HZ + 999) / 1000);
+	if (!in_interrupt()) {
+		msleep(xmsec);
 	} else {
 		mdelay(xmsec);
 	}


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-01-24 14:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-21 19:47 [KJ] [PATCH 30/39] sound/vx_core: replace schedule_timeout() with Nishanth Aravamudan
2005-01-24 14:10 ` [PATCH 30/39] sound/vx_core: replace schedule_timeout() with msleep() Takashi Iwai
2005-01-24 14:10   ` [KJ] Re: [Alsa-devel] [PATCH 30/39] sound/vx_core: replace Takashi Iwai
  -- strict thread matches above, loose matches on Subject: below --
2005-01-21 19:47 [PATCH 30/39] sound/vx_core: replace schedule_timeout() with msleep() Nishanth Aravamudan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.