Re: [PATCH v4 08/15] ARC: Linux Syscall Interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 12 Mar 2020, Vineet Gupta via Libc-alpha wrote:

> diff --git a/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h b/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h
> new file mode 100644
> index 000000000000..74b0c06edb36
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/arc/bits/socket-constants.h

As far as I can see, the only reason for having this header is to use 
appropriate values of SO_RCVTIMEO and SO_SNDTIMEO for 64-bit time.

It's best not to need a separate version of this header for all future 
32-bit architectures.  So I'd suggest putting the conditionals on the size 
of time_t in the default sysdeps/unix/sysv/linux/bits/socket-constants.h 
instead.

Should the choice of values of these macros, for normal user programs, be 
based on the time_t for the current compilation (as affected by _TIME_BITS 
in future) or on the time_t for the default ABI in glibc?  If the latter, 
it would be a __TIMESIZE conditional in the header (that is, a conditional 
based on __TIMESIZE == __SYSCALL_WORDSIZE, or using __WORDSIZE when 
__SYSCALL_WORDSIZE is not defined, since the actual kernel conditional is 
about whether using the same time_t size as kernel "long").  If the 
former, it might use __TIMESIZE right now, but that would need to change 
when _TIME_BITS is supported to a different macro meaning the time_t size 
for the current compilation.

> diff --git a/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
> new file mode 100644
> index 000000000000..6c129398483a
> --- /dev/null
> +++ b/sysdeps/unix/sysv/linux/arc/jmp_buf-macros.h
> @@ -0,0 +1,6 @@
> +#define JMP_BUF_SIZE		(32 + 1 + 64/(8 * sizeof (unsigned long int))) * sizeof (unsigned long int)
> +#define SIGJMP_BUF_SIZE		(32 + 1 + 64/(8 * sizeof (unsigned long int))) * sizeof (unsigned long int)

Missing spaces around '/'.

> +/* The minimum supported kernel version for ARC is 3.9,
> +   guaranteeing many kernel features.  */

But actually it's 5.1 at present.

> +/* All syscall handler come here to avoid generated code bloat due to
> +   GOT reference  to errno_location or it's equivalent.  */
> +int
> +__syscall_error(int err_no)

Missing space before '('

> +{
> +  __set_errno(-err_no);

Likewise.

-- 
Joseph S. Myers
joseph@xxxxxxxxxxxxxxxx

_______________________________________________
linux-snps-arc mailing list
linux-snps-arc@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/linux-snps-arc



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux