login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
January
»
9
Re: [PATCH 0/7] convert semaphore to mutex in struct class
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Dave Young <hidave.darkstar@...>
To: Greg KH <gregkh@...>
Cc: Stefan Richter <stefanr@...>, <James.Bottomley@...>, <dbrownell@...>, <linux-scsi@...>, <a.zummo@...>, <peterz@...>, <cbou@...>, <linux-kernel@...>, David Brownell <david-b@...>, <krh@...>, <stern@...>, <rtc-linux@...>, <spi-devel-general@...>, <linux1394-devel@...>, <dwmw2@...>, <davem@...>, <jarkao2@...>
Subject:
Re: [PATCH 0/7] convert semaphore to mutex in struct class
Date: Tuesday, January 8, 2008 - 9:32 pm
On Jan 9, 2008 6:48 AM, Greg KH <gregkh@suse.de> wrote:
quoted text
> On Tue, Jan 08, 2008 at 03:05:10PM +0800, Dave Young wrote: > > On Jan 8, 2008 1:20 AM, Greg KH <gregkh@suse.de> wrote: > > > On Mon, Jan 07, 2008 at 06:13:37PM +0100, Stefan Richter wrote: > > > > It's already in the driver core to the most part. It remains to be seen > > > > what is less complicated in the end: Transparent mutex-protected list > > > > accesses provided by driver core (requires the iterator), or all the > > > > necessary locking done by the drivers themselves (requires some more > > > > lock-taking but perhaps fewer lock instances overall in the drivers, and > > > > respective redefinitions and documentation of the driver core API). > > > > > > I favor changing the driver core api and doing this kind of thing there. > > > It keeps the drivers simpler and should hopefully make their lives > > > easier. > > > > What about this? > > > > #define class_for_each_dev(pos, head, member) \ > > for (mutex_lock(&(container_of(head, struct class, devices))->mutex), po > > s = list_entry((head)->next, typeof(*pos), member); \ > > prefetch(pos->member.next), &pos->member != (head) ? 1 : (mutex_unlock(& > > (container_of(head, struct class, devices))->mutex), 0); \ > > pos = list_entry(pos->member.next, typeof(*pos), member)) >
I'm wrong, it's same as before indeed.
quoted text
> Eeek, just make the thing a function please, where you pass the iterator > function in, like the driver core has (driver_for_each_device)
Ok, so need a new member of knode_class, I will update the patch later. Thanks.
quoted text
> > thanks, > > greg k-h >
--
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 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Thu Jan 3, 1:50 am)
[PATCH 1/7] driver core : convert semaphore to class in stru...
, Dave Young
, (Thu Jan 3, 1:52 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Stefan Richter
, (Sun Jan 6, 2:41 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Sun Jan 6, 10:09 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Greg KH
, (Mon Jan 7, 4:45 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Mon Jan 7, 6:00 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, David Brownell
, (Mon Jan 7, 5:01 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Stefan Richter
, (Mon Jan 7, 9:23 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Greg KH
, (Mon Jan 7, 11:44 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Stefan Richter
, (Mon Jan 7, 1:13 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Alan Stern
, (Mon Jan 7, 1:25 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Greg KH
, (Mon Jan 7, 1:20 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Tue Jan 8, 3:05 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Greg KH
, (Tue Jan 8, 6:48 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Tue Jan 8, 9:32 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Wed Jan 9, 2:13 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Wed Jan 9, 2:37 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Wed Jan 9, 2:39 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Thu Jan 10, 5:48 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Greg KH
, (Thu Jan 10, 2:39 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Thu Jan 10, 10:40 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Alan Stern
, (Thu Jan 10, 11:41 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Thu Jan 10, 10:37 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Cornelia Huck
, (Thu Jan 10, 9:23 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Thu Jan 10, 10:33 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Cornelia Huck
, (Fri Jan 11, 4:23 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Fri Jan 11, 4:53 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Stefan Richter
, (Thu Jan 10, 8:34 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Thu Jan 10, 10:18 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Jarek Poplawski
, (Mon Jan 7, 10:00 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Stefan Richter
, (Mon Jan 7, 12:36 pm)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Jarek Poplawski
, (Thu Jan 3, 3:06 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Jarek Poplawski
, (Thu Jan 3, 3:24 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Dave Young
, (Thu Jan 3, 3:21 am)
Re: [PATCH 0/7] convert semaphore to mutex in struct class
, Jarek Poplawski
, (Thu Jan 3, 3:41 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg Kroah-Hartman
[PATCH 004/196] Chinese: add translation of SubmittingPatches
Rafael J. Wysocki
[Bug #11210] libata badness
Andrea Arcangeli
[PATCH 00 of 11] mmu notifier #v16
Andrew Morton
Re: -mm merge plans for 2.6.23 -- sys_fallocate
git
:
openbsd-misc
:
linux-netdev
:
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
Daniel Eischen
Re: error with thread
David Miller
Re: [GIT]: Networking
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Colocation donated by:
Who's online
There are currently
1 user
and
840 guests
online.
Online users
strcmp
Syndicate