Messages in this thread | | | From | David Woodhouse <> | Subject | Re: [RFC] Wine speedup through kernel module | Date | Tue, 12 Sep 2000 14:56:48 +0100 |
| |
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/
| |