|
From: Tom H. <th...@cy...> - 2004-11-08 23:47:28
|
In message <Pin...@he...>
Nicholas Nethercote <nj...@ca...> wrote:
> But the __NR_foo name means different things on different architectures.
>
> Take __NR_lchown as an example. On x86, when you call
> syscall(__NR_lchown, ...), it ends up calling sys_lchown16() in the
> kernel. On x86-64, it instead ends up calling sys_lchown() in the kernel.
> There are lots of examples like this.
>
> The syscall wrappers (the PRE() and POST()) functions should be matched
> with the correct sys_foo()/old_foo() functions. We don't know just by
> looking at the __NR_foo constant which sys_foo() function will be called,
> so we need to specify the __NR_foo-->sys_foo() mapping ourselves.
Ah right. I didn't realise that there were differences like that
between platforms. I understand the logic now.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|