This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 07/11] nds32: Linux Syscall Interface
On Sat, May 12, 2018 at 03:21:22PM +0800, Florian Weimer wrote:
> On 05/10/2018 04:58 AM, Vincent Chen wrote:
> >>>>> +#include <errno.h>
> >>>>> +#include <stdarg.h>
> >>>>> +#include <sysdep.h>
> >>>>> +long int syscall (long int __sysno, ...)
> >>>>> +{
> >>>>> +
> >>>>> + int result;
> >>>>> + unsigned long arg1,arg2,arg3,arg4,arg5,arg6;
> >>>>> + va_list arg;
> >>>>> + va_start (arg, __sysno);
> >>>>> + arg1 = va_arg (arg, unsigned long);
> >>>>> + arg2 = va_arg (arg, unsigned long);
> >>>>> + arg3 = va_arg (arg, unsigned long);
> >>>>> + arg4 = va_arg (arg, unsigned long);
> >>>>> + arg5 = va_arg (arg, unsigned long);
> >>>>> + arg6 = va_arg (arg, unsigned long);
> >>>>> + va_end (arg);
> >>>>> + __asm__ volatile ( "" ::: "memory" );
> >>>>> + result = INLINE_SYSCALL_NCS(__sysno,6,arg1,arg2,arg3,arg4,arg5,arg6);
> >>>>> + return result;
> >>>>> +}
>
> > So, I think the memory barrier is not needed
> > now. I will remove it in the next version patch.
>
> Please also fix the style issues???syscall should be at the start of the
> line, and there should be spaces after the commas, before (, but not
> after ( and before ).
>
> Thanks,
> Florian
OK, I will modify it in the next version patch.
Thanks for your suggestions.
Best regards
Vincent Chen