Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176901
b: refs/heads/master
c: 8f78df8
h: refs/heads/master
i:
  176899: 6b0495f
v: v3
  • Loading branch information
Helge Deller authored and Kyle McMartin committed Dec 16, 2009
1 parent 2a67692 commit d76a5fd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 11e178091f6a9c5ca479f8a276b9dd0dfacf8fc4
refs/heads/master: 8f78df872d463ac43315916663b3e688ebb2422f
23 changes: 9 additions & 14 deletions trunk/arch/parisc/kernel/unwind.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/kallsyms.h>
#include <linux/sort.h>

#include <asm/uaccess.h>
#include <asm/assembly.h>
Expand Down Expand Up @@ -115,24 +116,18 @@ unwind_table_init(struct unwind_table *table, const char *name,
}
}

static int cmp_unwind_table_entry(const void *a, const void *b)
{
return ((const struct unwind_table_entry *)a)->region_start
- ((const struct unwind_table_entry *)b)->region_start;
}

static void
unwind_table_sort(struct unwind_table_entry *start,
struct unwind_table_entry *finish)
{
struct unwind_table_entry el, *p, *q;

for (p = start + 1; p < finish; ++p) {
if (p[0].region_start < p[-1].region_start) {
el = *p;
q = p;
do {
q[0] = q[-1];
--q;
} while (q > start &&
el.region_start < q[-1].region_start);
*q = el;
}
}
sort(start, finish - start, sizeof(struct unwind_table_entry),
cmp_unwind_table_entry, NULL);
}

struct unwind_table *
Expand Down

0 comments on commit d76a5fd

Please sign in to comment.