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] [RFC][PATCH 2/5] char/tpqic02: use poll_event*() interface
Date: Thu, 03 Mar 2005 20:32:15 +0000	[thread overview]
Message-ID: <20050303203215.GA16078@us.ibm.com> (raw)
In-Reply-To: <20050303182541.GE11600@us.ibm.com>

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

On Thu, Mar 03, 2005 at 08:16:54PM +0100, walter harms wrote:
> 
> 
> 
> Nishanth Aravamudan wrote:
> >Hi,
> >
> >Description: Use new poll_event*() interface to encapsulate sleep-loops.
> >
> >Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
> >
> >--- 2.6.11-kj-v/drivers/char/tpqic02.c	2005-03-01 
> >23:38:09.000000000 -0800
> >+++ 2.6.11-kj/drivers/char/tpqic02.c	2005-03-03 10:23:59.000000000 -0800
> >@@ -527,18 +527,14 @@ static int wait_for_ready(time_t timeout
> > 		return TE_OK;	/* covers 99.99% of all calls */
> > 
> > 	/* Then use schedule() a few times */
> >-	spin_t = 3;		/* max 0.03 sec busy waiting */
> >+	spin_t = 3;		/* request max 0.003 sec busy waiting */
> 
> > 	if (spin_t > timeout)
> > 		spin_t = timeout;
> > 	timeout -= spin_t;
> 
> 
> hi nish,
> 	the code above looks like:  timeout%=spin_t;

Could be, but one thing at a time :)

> the poll*() looks reasonable. perhaps its better to use functions ?

I used macros so that the @condition could be passed in as a parameter
(not possible, at least easily, with functions, I don't think).

> As user i would like to know WHY the wait terminated, it may be 
> important to know if a signal or timeout occured, are there ways to find 
> out ?

I certainly could change the macros to respond in the same way that
wait_event*() do.

To the list, does that seem like a more reasonable approach?

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

  reply	other threads:[~2005-03-03 20:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-03 18:25 [KJ] [RFC][PATCH 2/5] char/tpqic02: use poll_event*() interface Nishanth Aravamudan
2005-03-03 20:32 ` Nishanth Aravamudan [this message]
2005-03-05  1:15 ` Adrian Bunk

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=20050303203215.GA16078@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.