All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] i386/apm: use wait_event_interruptible_timeout()
Date: Tue, 03 May 2005 21:40:26 +0000	[thread overview]
Message-ID: <20050503214026.GC3372@us.ibm.com> (raw)
In-Reply-To: <20050502061824.GC10173@us.ibm.com>

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

On 01.05.2005 [23:18:24 -0700], Nishanth Aravamudan wrote:
> Use wait_event_interruptible_timeout() instead of custom wait-queue.
> 
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> 
> --- 2.6.12-rc3/arch/i386/kernel/apm.c	2005-04-29 11:03:03.000000000 -0700
> +++ 2.6.12-rc3-dev/arch/i386/kernel/apm.c	2005-05-01 19:02:48.000000000 -0700
> @@ -224,6 +224,7 @@
>  #include <linux/smp_lock.h>
>  #include <linux/dmi.h>
>  #include <linux/suspend.h>
> +#include <linux/wait.h>
>  
>  #include <asm/system.h>
>  #include <asm/uaccess.h>
> @@ -1418,22 +1419,15 @@ static void apm_event_handler(void)
>  
>  static void apm_mainloop(void)
>  {
> -	DECLARE_WAITQUEUE(wait, current);
> -
> -	add_wait_queue(&apm_waitqueue, &wait);
> -	set_current_state(TASK_INTERRUPTIBLE);
> -	for (;;) {
> -		schedule_timeout(APM_CHECK_TIMEOUT);
> -		if (exit_kapmd)
> -			break;
> +	do {
> +		wait_event_interruptible_timeout(apm_waitqueue,
> +				exit_kapmd, APM_CHECK_TIMEOUT);

Hmm, this will lead to some not so subtle breakage with wait-queues.
Please do not apply.

Thanks,
Nish

[-- 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

WARNING: multiple messages have this Message-ID (diff)
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: sfr@canb.auug.org.au
Cc: Kernel-Janitors <kernel-janitors@lists.osdl.org>,
	linux-laptop@vger.kernel.org
Subject: Re: [KJ] [PATCH] i386/apm: use wait_event_interruptible_timeout()
Date: Tue, 3 May 2005 14:40:26 -0700	[thread overview]
Message-ID: <20050503214026.GC3372@us.ibm.com> (raw)
In-Reply-To: <20050502061824.GC10173@us.ibm.com>

On 01.05.2005 [23:18:24 -0700], Nishanth Aravamudan wrote:
> Use wait_event_interruptible_timeout() instead of custom wait-queue.
> 
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> 
> --- 2.6.12-rc3/arch/i386/kernel/apm.c	2005-04-29 11:03:03.000000000 -0700
> +++ 2.6.12-rc3-dev/arch/i386/kernel/apm.c	2005-05-01 19:02:48.000000000 -0700
> @@ -224,6 +224,7 @@
>  #include <linux/smp_lock.h>
>  #include <linux/dmi.h>
>  #include <linux/suspend.h>
> +#include <linux/wait.h>
>  
>  #include <asm/system.h>
>  #include <asm/uaccess.h>
> @@ -1418,22 +1419,15 @@ static void apm_event_handler(void)
>  
>  static void apm_mainloop(void)
>  {
> -	DECLARE_WAITQUEUE(wait, current);
> -
> -	add_wait_queue(&apm_waitqueue, &wait);
> -	set_current_state(TASK_INTERRUPTIBLE);
> -	for (;;) {
> -		schedule_timeout(APM_CHECK_TIMEOUT);
> -		if (exit_kapmd)
> -			break;
> +	do {
> +		wait_event_interruptible_timeout(apm_waitqueue,
> +				exit_kapmd, APM_CHECK_TIMEOUT);

Hmm, this will lead to some not so subtle breakage with wait-queues.
Please do not apply.

Thanks,
Nish

  reply	other threads:[~2005-05-03 21:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-02  6:18 [KJ] [PATCH] i386/apm: use wait_event_interruptible_timeout() Nishanth Aravamudan
2005-05-02  6:18 ` Nishanth Aravamudan
2005-05-03 21:40 ` Nishanth Aravamudan [this message]
2005-05-03 21:40   ` [KJ] " Nishanth Aravamudan
  -- strict thread matches above, loose matches on Subject: below --
2005-05-02  6:14 [KJ] [PATCH] net/3c505: replace schedule_timeout() with msleep() Nishanth Aravamudan
2005-05-02  6:14 ` Nishanth Aravamudan
2005-05-02  6:26 ` [KJ] [PATCH] ppc/fcc_enet: replace schedule_timeout() with ssleep() Nishanth Aravamudan
2005-05-02  6:26   ` Nishanth Aravamudan
2005-05-02  6:34 ` [KJ] [PATCH] net/slip: replace schedule_timeout() with Nishanth Aravamudan
2005-05-02  6:34   ` [KJ] [PATCH] net/slip: replace schedule_timeout() with msleep_interruptible() Nishanth Aravamudan

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=20050503214026.GC3372@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    /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 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.