From: Ingo Molnar <mingo@elte.hu>
To: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Steven Whitehouse <swhiteho@redhat.com>,
linux-kernel@vger.kernel.org,
Russell Cattelan <cattelan@redhat.com>,
David Teigland <teigland@redhat.com>,
hch@infradead.org
Subject: Re: [PATCH 02/16] GFS2: Core locking interface
Date: Fri, 1 Sep 2006 13:10:04 +0200 [thread overview]
Message-ID: <20060901111004.GA8517@elte.hu> (raw)
In-Reply-To: <Pine.LNX.4.61.0609010852470.25521@yvahk01.tjqt.qr>
* Jan Engelhardt <jengelh@linux01.gwdg.de> wrote:
> I suppose so. If they were initialized statically, this function could
> possibly be dropped.
>
> >+typedef void lm_lockspace_t;
> >+typedef void lm_lock_t;
> >+typedef void lm_fsdata_t;
>
> Try to avoid typedefs for
> - simple types like these (int/void/etc.)
> - structures
yeah. If we dont want to expose a type externally, we forward declare
the structure, and pointers to it can then be used and passed around.
That's also more type-safe (and obviously more readable) than a typedef
to void.
> >+ error = glock_wait_internal(gh);
> >+ if (error == GLR_CANCELED) {
> >+ msleep(100);
>
> msleep is a busy-waiter IIRC. Really want to do that - what about some
> schedulling?
no. mdelay() is the busy-waiter - msleep() is scheduling based.
> >+ borked = 1;
> >+ serious = error;
>
> This got me a laugh :)
me too - the hidden joys of code review :-)
Ingo
next prev parent reply other threads:[~2006-09-01 11:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-31 13:29 Steven Whitehouse
2006-09-01 7:19 ` Jan Engelhardt
2006-09-01 11:10 ` Ingo Molnar [this message]
2006-09-04 9:01 ` Steven Whitehouse
2006-09-04 9:22 ` Jan Engelhardt
2006-09-04 15:40 ` Steven Whitehouse
2006-09-04 17:51 ` Jan Engelhardt
-- strict thread matches above, loose matches on Subject: below --
2006-04-21 16:10 Steven Whitehouse
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=20060901111004.GA8517@elte.hu \
--to=mingo@elte.hu \
--cc=cattelan@redhat.com \
--cc=hch@infradead.org \
--cc=jengelh@linux01.gwdg.de \
--cc=linux-kernel@vger.kernel.org \
--cc=swhiteho@redhat.com \
--cc=teigland@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®