This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/4] Add INTERNAL_SYSCALL_CALL


On Tue, Aug 23, 2016 at 04:15:55PM -0300, Adhemerval Zanella wrote:
> Thanks for review, comments below.
> 
> On 22/08/2016 12:28, Yury Norov wrote:
> >> ---
> >>  sysdeps/unix/sysdep.h | 42 +++++++++++++++++++++++++++++++++++++++---
> >>  2 files changed, 56 insertions(+), 3 deletions(-)
> >>
> >> +
> >> +#define __INTERNAL_SYSCALL_NARGS_X(a,b,c,d,e,f,g,h,n,...) n
> > 
> > Missed whitespaces after commas?
> > 
> 
> Ack.
> 
> >> +#define __INTERNAL_SYSCALL_NARGS(...) \
> >> +  __INTERNAL_SYSCALL_NARGS_X (__VA_ARGS__,7,6,5,4,3,2,1,0,)
> > 
> > Same
> > 
> 
> Ack.
> 
> >> +#define __INTERNAL_SYSCALL_CONCAT_X(a,b)     a##b
> > 
> > Same
> > 
> 
> Ack.
> 
> >> +#define __INTERNAL_SYSCALL_CONCAT(a,b)       __SYSCALL_CONCAT_X (a, b)
> >> +#define __INTERNAL_SYSCALL_DISP(b,err,...) \
> >> +  __INTERNAL_SYSCALL_CONCAT (b,__SYSCALL_NARGS(__VA_ARGS__))(err,__VA_ARGS__)
> > 
> > Missed whitespaces after commas and before opening braces?
> > 
> 
> Ack.
> 
> >> +
> >> +/* Issue a syscall defined by syscall number plus any other argument required.
> >> +   It is similar to INLINE_SYSCALL macro, but without the need to pass the
> > 
> > Did you mean INTERNAL_SYSCALL macro?
> > 
> 
> Yes, I will fix it.
> 
> >> +   expected argument number as second parameter.  */
> >> +#define INTERNAL_SYSCALL_CALL(nr, err, ...) \
> >> +  __INTERNAL_SYSCALL_DISP (__INTERNAL_SYSCALL, nr, err, __VA_ARGS__)
> >> +
> >>  #define __SYSCALL0(name) \
> >>    INLINE_SYSCALL (name, 0)
> >>  #define __SYSCALL1(name, a1) \
> >> @@ -49,17 +80,22 @@
> >>  #define __SYSCALL_DISP(b,...) \
> >>    __SYSCALL_CONCAT (b,__SYSCALL_NARGS(__VA_ARGS__))(__VA_ARGS__)
> >>  
> >> -#define __SYSCALL_CALL(...) __SYSCALL_DISP (__SYSCALL, __VA_ARGS__)
> >> +/* Issue a syscall defined by syscall number plus any other argument required.
> >> +   Any error will be handled using arch defined macros and errno will be se
> >> +   accordingly.
> >> +   It is similar to INLINE_SYSCALL macro, but without the need to pass the
> >> +   expected argument number as second parameter.  */
> >> +#define INLINE_SYSCALL_CALL(...) __SYSCALL_DISP (__SYSCALL, __VA_ARGS__)
> > 
> > Missed whitespaces after commas and before opening braces?
> 
> For INLINE_SYSCALL_DEFINITION you mean? I do not think so, 'indent' also
> shows no change for this specific snippet. 

I missed. It was about __SYSCALL_DISP(), though you didn't touch it...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]