login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
July
»
29
Re: [PATCH] Introduce down_try() so we can move away from down_trylock()
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Paul Menage
Subject:
Re: [PATCH] Introduce down_try() so we can move away from down_trylock()
Date: Monday, July 28, 2008 - 5:27 pm
On Mon, Jul 28, 2008 at 5:15 PM, Rusty Russell <rusty@rustcorp.com.au> wrote:
quoted text
> I planned on removing the much-disliked down_trylock() (with its > backwards return codes) in 2.6.27, but it's creating something of a > logjam with other patches in -mm and linux-next. > > Andrew suggested introducing "down_try" as a wrapper now, to make > the transition easier. Linus, please apply. > > Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> > Cc: Andrew Morton <akpm@linux-foundation.org> > Cc: Christoph Hellwig <hch@infradead.org> > Cc: Matthew Wilcox <matthew@wil.cx> > Cc: Stephen Rothwell <sfr@canb.auug.org.au> > --- > include/linux/semaphore.h | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff -r 92664ae4130b include/linux/semaphore.h > --- a/include/linux/semaphore.h Wed May 21 14:54:40 2008 +1000 > +++ b/include/linux/semaphore.h Wed May 21 15:07:31 2008 +1000 > @@ -48,4 +48,18 @@ extern int __must_check down_timeout(str > extern int __must_check down_timeout(struct semaphore *sem, long jiffies); > extern void up(struct semaphore *sem); > > +/** > + * down_try - try to down a semaphore, but don't block > + * @sem: the semaphore > + * > + * This is equivalent to down_trylock(), but has the same return codes as > + * spin_trylock and mutex_trylock: 1 if semaphore acquired, 0 if not.
Is there a reason to avoid using a return type of "bool" for this? Paul --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] Introduce down_try() so we can move away from down ...
, Rusty Russell
, (Mon Jul 28, 5:15 pm)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Paul Menage
, (Mon Jul 28, 5:27 pm)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Rusty Russell
, (Tue Jul 29, 6:01 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Randy Dunlap
, (Tue Jul 29, 9:21 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Rusty Russell
, (Tue Jul 29, 4:56 pm)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Linus Torvalds
, (Fri Aug 1, 10:26 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Andrew Morton
, (Fri Aug 1, 10:40 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Linus Torvalds
, (Fri Aug 1, 11:22 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Rusty Russell
, (Sun Aug 3, 1:33 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Matthew Wilcox
, (Sun Aug 3, 6:07 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Linus Torvalds
, (Sun Aug 3, 10:33 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Linus Torvalds
, (Sun Aug 3, 10:35 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Rusty Russell
, (Sun Aug 3, 8:28 pm)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Linus Torvalds
, (Sun Aug 3, 10:53 pm)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Rusty Russell
, (Mon Aug 4, 12:57 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Alan Cox
, (Mon Aug 4, 1:45 am)
Re: [PATCH] Introduce down_try() so we can move away from ...
, Rusty Russell
, (Mon Aug 4, 4:43 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Russell King
Re: ARM defconfig files
Benjamin Herrenschmidt
Re: [PATCH 1/4] hvc_console: do not set low_latency
Jordan Crouse
Re: 2.6.25-mm1
Carsten Otte
Re: [patch] ext2: xip check fix
James Morris
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_create LSM hook
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Johannes Schindelin
[PATCH] fetch: refuse to fetch into the current branch in a non-bare repository
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Peter Oberndorfer
Subject: [PATCH] fix stg edit command
Andreas Ericsson
Re: why not TortoiseGit
linux-netdev
:
Ursula Braun
[patch 2/8] [PATCH] af_iucv: sync sk shutdown flag if iucv path is quiesced
Andi Kleen
Re: RFC: Nagle latency tuning
Gary Thomas
Re: Marvell 88E609x switch?
David Miller
Re: [RFC 0/5] generic rx recycling
Chuck Lever
Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
git-commits-head
:
Linux Kernel Mailing List
New device ID for sc92031 [1088:2031]
Linux Kernel Mailing List
e1000e: Expose MDI-X status via ethtool change
Linux Kernel Mailing List
arm/imx/gpio: GPIO_INT_{HIGH,LOW}_LEV are not necessarily constant
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
trivial: fix comment typo in fs/compat.c
openbsd-misc
:
Theo de Raadt
Re: RES: OpenBSD on IBM System X3550 7879
Bret S. Lambert
Re: any web management gui for pf ?
Rob Shepherd
x86 hardware for router system
Flickr Photo Map for iPad and iPhone
Thanks for the Great Launch of Flickr Photo Map for iPad + iPhone
Nick Holland
Re: 1 out of 3 hunks failed--saving rejects to kerberosV/src/lib/krb5/crypto.c.rej
Colocation donated by:
Syndicate