[PATCH 07/11] nds32: Linux Syscall Interface
Florian Weimer
fweimer@redhat.com
Sat May 12 07:21:00 GMT 2018
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
More information about the Libc-alpha
mailing list