[CRIU] [PATCH] x86: syscall -- Drop redundant _sys_ part from definition

Pavel Emelyanov xemul at parallels.com
Tue Apr 7 05:42:58 PDT 2015


On 04/07/2015 03:31 PM, Cyrill Gorcunov wrote:
> On Tue, Apr 07, 2015 at 02:52:04PM +0300, Pavel Emelyanov wrote:
>> On 04/07/2015 12:25 PM, Cyrill Gorcunov wrote:
>>> Somehow _sys_ token sneaked into __NR term. Drop it off
>>> to be close to kernel's representation.
>>>
>>> Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
>>> ---
>>>  arch/x86/syscall-x86-64.def | 10 +++++-----
>>>  1 file changed, 5 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/arch/x86/syscall-x86-64.def b/arch/x86/syscall-x86-64.def
>>> index b793e8e1ef68..29afdf8008c4 100644
>>> --- a/arch/x86/syscall-x86-64.def
>>> +++ b/arch/x86/syscall-x86-64.def
>>> @@ -79,11 +79,11 @@ __NR_set_thread_area	205		sys_set_thread_area	(user_desc_t *info)
>>>  __NR_get_thread_area	211		sys_get_thread_area	(user_desc_t *info)
>>>  __NR_set_tid_address	218		sys_set_tid_address	(int *tid_addr)
>>>  __NR_restart_syscall	219		sys_restart_syscall	(void)
>>> -__NR_sys_timer_create	222		sys_timer_create	(clockid_t which_clock, struct sigevent *timer_event_spec, timer_t *created_timer_id)
>>> -__NR_sys_timer_settime	223		sys_timer_settime	(timer_t timer_id, int flags, const struct itimerspec *new_setting, struct itimerspec *old_setting)
>>> -__NR_sys_timer_gettime	224		sys_timer_gettime	(int timer_id, const struct itimerspec *setting)
>>> -__NR_sys_timer_getoverrun	225		sys_timer_getoverrun	(int timer_id)
>>> -__NR_sys_timer_delete	226		sys_timer_delete	(timer_t timer_id)
>>> +__NR_timer_create	222		sys_timer_create	(clockid_t which_clock, struct sigevent *timer_event_spec, timer_t *created_timer_id)
>>> +__NR_timer_settime	223		sys_timer_settime	(timer_t timer_id, int flags, const struct itimerspec *new_setting, struct itimerspec *old_setting)
>>> +__NR_timer_gettime	224		sys_timer_gettime	(int timer_id, const struct itimerspec *setting)
>>> +__NR_timer_getoverrun	225		sys_timer_getoverrun	(int timer_id)
>>> +__NR_timer_delete	226		sys_timer_delete	(timer_t timer_id)
>>
>> Huh? How is this file used/compiled/parsed if the constant can be either?
> 
> The constants are used directly in generates asm file so it doesn't matter HOW
> you name it (even __NR_1 and etc). We don't use these __NR_restart_syscall
> in C code so the change here is simply to use names close to ones used in
> the kernel.

Why do we need these constants at all then?



More information about the CRIU mailing list