From: Ingo Molnar <mingo@elte.hu>
To: Christoph Hellwig <hch@infradead.org>,
Jes Sorensen <jes@trained-monkey.org>,
Christoph Hellwig <hch@lst.de>,
linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: [patch] updates XFS mutex patch
Date: Thu, 29 Dec 2005 20:41:53 +0100 [thread overview]
Message-ID: <20051229194153.GA27897@elte.hu> (raw)
In-Reply-To: <20051229171135.GA21988@infradead.org>
* Christoph Hellwig <hch@infradead.org> wrote:
> > > It's say just switch XFS to the one-arg mutex_init variant.
> > >
> > > And ingo. please add the mutex_t typedef, analogue to spinlock_t it's
> > > a totally opaqueue to the users type, so it really should be a
> > > typedef. After that the XFS mutex.h can just go away.
> >
> > that's not possible, due to DEFINE_MUTEX() and due to struct mutex being
> > embedded in other structures. I dont think we want to lose that property
> > of struct semaphore, and only restrict mutex usage to pointers.
>
> Sorry, but I don't get this sentence at all. Can you try to rephrase
> it? What does DEFINE_MUTEX have to do with declaring either a typedef
> or structure?
i think i misunderstood you. I thought you wanted a mutex_t a'la
kmem_cache_t (which is only fully defined in mm/slab.c) - for the
purpose of hiding the implementation of mutex_t. If the implementation
of mutex_t is still present in mutex.h, i dont see what the advantage
is. What's the difference between 'struct mutex' and 'mutex_t', besides
that first one being clearer that here we have a kernel object? (we
generally use the _t types for type-safe variations of integer types,
e.g. pte_t.)
Ingo
prev parent reply other threads:[~2005-12-29 19:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-29 10:59 [patch] updates XFS mutex patch Jes Sorensen
2005-12-29 11:03 ` Arjan van de Ven
2005-12-29 11:06 ` Jes Sorensen
2005-12-29 11:07 ` Ingo Molnar
2005-12-29 14:48 ` Christoph Hellwig
2005-12-29 16:38 ` Jes Sorensen
2005-12-29 16:58 ` Ingo Molnar
2005-12-29 17:11 ` Christoph Hellwig
2005-12-29 19:41 ` Ingo Molnar [this message]
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=20051229194153.GA27897@elte.hu \
--to=mingo@elte.hu \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=jes@trained-monkey.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox