lkml.org 
[lkml]   [2003]   [Jan]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: return-type for search_extable()
Date
In message <15921.33955.645830.709868@napali.hpl.hp.com> you write:
> Hi Rusty,
>
> Could you please change the return-type of search_extable() to
> something that allows a bit more flexibility? The value returned by
> this function is "something that lets architecture-specific code
> recover from a memory-managment-fault". This may or may not be the
> same as an exception_table_entry. For example, on ia64, I want to
> return an already-relocated fixup-word. Perhaps the cleanest way to
> fix this would be to have:
>
> exception_fixup_t search_extable (...);
>
> By default, you could then use
>
> typedef struct exception_table_entry *exception_fixup_t;
>
> and on ia64 I could use:
>
> typedef long exception_fixup_t.

Sure. Of course, you could just cast the return value to a long
inside ia64, but that's pretty unclear.

Hmm, I actually just tried to do this, and like all typedefs, it's
icky. search_exception_table() belongs in kernel.h, not module.h
where it is now. But that means kernel.h has to include asm/uaccess.h
to get exception_fixup_t.

Maybe the cleanest way really is to simply document that your
search_extable() returns the fixup word... 8(

Rusty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:32    [W:0.080 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site