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/8] Use inline syscalls for non-cancellable versions


> +  ({ int __ret = INLINE_SYSCALL (open, 3, name, flags, mode); \
> +     __ret; })

What's the purpose of the statement expression and the result variable?
Why isn't the rhs just the INLINE_SYSCALL invocation directly, or with
an (int) cast if need be?

Same for several more instances below.

> +#define __read_nocancel(fd, buf, len) \
> +  ({ ssize_t __ret = INLINE_SYSCALL (read, 3, fd, buf, len); \
> +     __ret; })


What's the purpose of the extra __read_nocancel macro layer?
Why isn't this just the definition of read_not_cancel?

Same for write and close, below.

> +#define waitpid_nocancel(pid, stat_loc, options) \
>    INLINE_SYSCALL (wait4, 4, pid, stat_loc, options, NULL)
> +#define waitpid_not_cancel(pid, stat_loc, options) \
> +  waitpid_nocancel(pid, stat_loc, options)

Here without the __ prefix the extra macro layer looks even more insane.


Thanks,
Roland


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