Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
at v2.6.22 33 lines 815 B view raw
1/* 2 * linux/arch/alpha/mm/extable.c 3 */ 4 5#include <linux/module.h> 6#include <asm/uaccess.h> 7 8void sort_extable(struct exception_table_entry *start, 9 struct exception_table_entry *finish) 10{ 11} 12 13const struct exception_table_entry * 14search_extable(const struct exception_table_entry *first, 15 const struct exception_table_entry *last, 16 unsigned long value) 17{ 18 while (first <= last) { 19 const struct exception_table_entry *mid; 20 unsigned long mid_value; 21 22 mid = (last - first) / 2 + first; 23 mid_value = (unsigned long)&mid->insn + mid->insn; 24 if (mid_value == value) 25 return mid; 26 else if (mid_value < value) 27 first = mid+1; 28 else 29 last = mid-1; 30 } 31 32 return NULL; 33}