On Sun, 21 Nov 2010, Greg KH wrote: > On Sun, Nov 21, 2010 at 02:23:18AM -0500, Robert P. J. Day wrote: > > > > what started off as just some nonchalant poking around in kernel > > data structures has become moderately educational. i had no idea > > that there is support for *sorting* the nodes of a kernel LL in > > <linux/list_sort.h>: > > > > > > void list_sort(void *priv, struct list_head *head, > > int (*cmp)(void *priv, struct list_head *a, > > struct list_head *b)); > > > > > > doesn't seem to be a lot of folks using that: > > It's very new. The drm code needed it, so they took it from the xfs > code and made it common code. > > > i wonder how much kernel code manually sorts a linked list, not > > realizing that there's kernel library support for that. > > Hopefully none other, if you find some please feel free to convert > it to use the core code. ah, thanks for clearing that up. i may add that to my LKD3 page, just for the informational value. rday p.s. speaking of LKD3, i'm still taking submissions for fixes/enhancements to the LKD3 book. -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ