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 3/3] nptl: Add tests for internal pthread_mutex_t offsets


On Mon, Oct 16, 2017 at 1:44 PM, Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
> This patch adds a new build test to check for internal fields
> offsets uses on pthread_mutex_t static initialization macros
> (PTHREAD_MUTEX_INITIALIZER, PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP,
> PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP, and
> PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP).
>
> Currently the only field which is statically initialized to a
> non zero/null value is pthread_mutex_t.__data.__kind value.  A new
> internal header (pthread-offset.h) is added to each major ABI with
> the reference value.
>
> Checked on x86_64-linux-gnu and with a build check for all affected
> ABIs (aarch64-linux-gnu, alpha-linux-gnu, arm-linux-gnueabihf,
> hppa-linux-gnu, i686-linux-gnu, ia64-linux-gnu, m68k-linux-gnu,
> microblaze-linux-gnu, mips64-linux-gnu, mips64-n32-linux-gnu,
> mips-linux-gnu, powerpc64le-linux-gnu, powerpc-linux-gnu,
> s390-linux-gnu, s390x-linux-gnu, sh4-linux-gnu, sparc64-linux-gnu,
> sparcv9-linux-gnu, tilegx-linux-gnu, tilegx-linux-gnu-x32,
> tilepro-linux-gnu, x86_64-linux-gnu, and x86_64-linux-x32).
>
>         * nptl/Makefile (tests-internal): Add tst-offsets.
>         * nptl/tst-offsets.c: New file.
>         * sysdeps/aarch64/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/alpha/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/arm/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/hppa/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/i386/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/ia64/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/m68k/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/microblaze/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/mips/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/nios2/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/powerpc/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/s390/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/sh/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/sparc/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/tile/nptl/pthread-offsets.h: Likewise.
>         * sysdeps/x86_64/nptl/pthread-offsets.h: Likewise.
> ---
>

__PTHREAD_MUTEX_HAVE_PREV affects quite few offsets.
We should check all of offsets which depend on it.


-- 
H.J.


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