[lkml]   [2000]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: portable way for issuing a far jmp?
On Sat, Aug 19, 2000 at 03:46:52AM +0200, Julien Oster wrote:

> Is there any macro or something as a clean way to jump to a function, instead
> of calling it? I don't want to use assembler as my modules are fairly
> portable by now.
> Sometime I want to _jump_ to a function instead of calling it. e.g., when
> wrapping around sys_delete_module, I like to jump to the old handler of
> sys_delete_module. The reason is, that when the module wrapping it gets
> deleten, the return from the old sys_delete_module gets into the area of the
> no longer available module (since the old sys_delete_module deletes it)...
> I could accomplish this with a little bit of assembler, tweaking with the
> stack and issueing a "JMP FAR" (on ix86), but that isn't portable in any
> way...

There are patches for gcc which implement tail optimization. Afaik
very recent gcc's have them implemented but most distributions ship
without such a compiler so you'd better not use that possibility. The
safer alternative is to arrange for a userprocess to do the module

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

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