lkml.org 
[lkml]   [2000]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [RFC] Wine speedup through kernel module
Date

David.Howells@nexor.co.uk said:
> But where do I get the other argument (struct pt_regs *) from? A
> normal Linux syscall does not appear to have access to such a beast...

With difficulty. A normal syscall wouldn't generally go through the lcall7
handler. Some of the ABI/iBCS code gets access to the struct pt_regs
though. It's probably not the best way to go, though.

Try something along these lines...

int (*sys_win32_handler)(args...);
EXPORT_SYMBOL(sys_win32_handler);

int sys_win32(args...)
{
ret = -ENOSYS;

if (current->personality != PER_WIN32) {
if (sys_personality(PER_WIN32))
return -ENOSYS;
}
/* Now the process has the WIN32 personality, so until it
exits, we know the module cannot be unloaded.
*/

return (*sys_win32_handler)(args...);
}


Code your win32 support module to register the PER_WIN32 personality, and
set the sys_win32_handler pointer appropriately. Probably not in that order.


--
dwmw2


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

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