lib/sort: Heapsort implementation of sort()
include/linux/sort.h
Quoted 10 lines · Matt Mackall
This patch adds a generic array sorting library routine. This is meant to replace qsort, which has two problem areas for kernel use.
include/linux/sort.h new file +3
-0@@ -0,0 +1,8 @@ +void sort (void *base,size_t num,size_t size, +int (*cmp)(const void *,const void *), +void (*swap)(void *,void *,int ));
extern void sort(...) ?
Alexey
P. S.: Andrew's email ends with ".org".
Quoted 9 lines · Alexey Dobriyan
Quoted 6 lines · Matt Mackall
This patch adds a generic array sorting library routine. This is meant to replace qsort, which has two problem areas for kernel use.
include/linux/sort.h new file +0
-0@@ -0,0 +1,8 @@
Quoted 5 lines
include/linux/sort.h line 3
Quoted 3 lines
include/linux/sort.h new file +3
-0+void sort (void *base,size_t num,size_t size, +int (*cmp)(const void *,const void *), +void (*swap)(void *,void *,int ));extern void sort(...) ?
Extern is 100% redundant on function declarations.
Quoted 1 line
P. S.: Andrew's email ends with ".org".
I should not mail off patches just before going to sleep.
Signature · 1 line
Mathematics is the supreme nostalgia of our time.