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] Add test for pthread_setname_np and pthread_getname_np.


On Tue, 4 Feb 2014, Carlos O'Donell wrote:

> diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
> index 3723535..d59531c 100644
> --- a/sysdeps/unix/sysv/linux/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/kernel-features.h
> @@ -199,7 +199,10 @@
>  
>  /* Support for the recvmmsg syscall was added in 2.6.33.  */
>  #if __LINUX_KERNEL_VERSION >= 0x020621
> -# define __ASSUME_RECVMMSG     1
> +# define __ASSUME_RECVMMSG             1
> +/* Assume that /proc/self/task/$tid/comm and /proc/$pid/task/$tid/comm
> +   exist.  */
> +# define __ASSUME_PROC_PID_TASK_COMM   1
>  #endif

This does not belong under the recvmmsg conditional; they should have 
separate #if conditionals, each with its own comment.

(It seems quite likely recvmmsg could have the same issue as accept4, with 
that macro needing splitting into three, as discussed for accept4 in 
<https://sourceware.org/ml/libc-alpha/2013-12/msg00014.html>; all of 
accept4, recvmmsg and sendmmsg follow the same pattern of, depending on 
the architecture, possibly being implemented through socketcall, a more 
specific syscall or both, with the potential for a syscall being added 
later than the socketcall support.  After moving the minimum to 2.6.32 I'm 
thinking of reviewing the remaining __ASSUME_* macros properly.)

-- 
Joseph S. Myers
joseph@codesourcery.com


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